impediments propagate fixed_versions to their children as well

pull/6827/head
Gregor Schmidt 13 years ago
parent a19634b3de
commit 0205268e22
  1. 6
      lib/redmine_backlogs/patches/issue_patch.rb

@ -196,6 +196,10 @@ module RedmineBacklogs::Patches::IssuePatch
backlogs_enabled? and (self.parent_issue_id && self.tracker_id == Task.tracker && Task.tracker.present?)
end
def is_impediment?
backlogs_enabled? and (self.parent_issue_id.nil? && self.tracker_id == Task.tracker && Task.tracker.present?)
end
def trackers
case
when is_story?
@ -267,7 +271,7 @@ module RedmineBacklogs::Patches::IssuePatch
ancestors = real_parent.ancestors.find_all_by_tracker_id(Issue.backlogs_trackers)
ancestors ? ancestors << real_parent : [real_parent]
root = ancestors.sort_by(&:right).find(&:is_story?)
root = ancestors.sort_by(&:right).find { |i| i.is_story? or i.is_impediment? }
end
root

Loading…
Cancel
Save