From: Kohei Yoshino Date: Mon, 8 Apr 2019 21:06:58 +0000 (-0400) Subject: Bug 1527459 - Display dependency bugs by type, using the same colour/icon for each X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b7e835f33ce119b21e10d083b457aac5c011ff68;p=thirdparty%2Fbugzilla.git Bug 1527459 - Display dependency bugs by type, using the same colour/icon for each --- diff --git a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl index d518c31f1..e94c43b6f 100644 --- a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl @@ -975,6 +975,7 @@ [% IF bug.dependson.size + bug.blocked.size > 1 %] [% WRAPPER bug_modal/field.html.tmpl + name = "dependencytree" container = 1 label = "" hide_on_edit = 1 diff --git a/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl index cadfe7c63..2fc6476e0 100644 --- a/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl @@ -385,9 +385,22 @@ END; [%# bug lists, depencancies, blockers %] [% BLOCK bug_list %] [% IF NOT edit %] - [% FOREACH b IN values %] - [% INCLUDE bug/link.html.tmpl bug=b link_text=b.id use_alias=1 %] - [% ", " UNLESS loop.last %] + [% FOREACH type IN bug_fields.bug_type.legal_values.pluck('name') %] + [% + bugs = []; + FOREACH b IN values; bugs.push(b) IF b.bug_type == type; END; + NEXT UNLESS bugs.size > 0; + %] +
+ + + + [% FOREACH b IN bugs %] + [% INCLUDE bug/link.html.tmpl bug=b link_text=b.id use_alias=1 %] + [% ", " UNLESS loop.last %] + [% END %] +
[% END %] [% ELSE %]