diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 609aae20..18d2af31 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -18,6 +18,17 @@ module IssuesHelper include ApplicationHelper + def issue_list(issues, &block) + ancestors = [] + issues.each do |issue| + while (ancestors.any? && !issue.is_descendant_of?(ancestors.last)) + ancestors.pop + end + yield issue, ancestors.size + ancestors << issue + end + end + def render_issue_tooltip(issue) @cached_label_start_date ||= l(:field_start_date) @cached_label_due_date ||= l(:field_due_date) @@ -43,17 +54,14 @@ module IssuesHelper def render_descendants_tree(issue) s = '