From: Sunil Joshi Date: Fri, 16 Nov 2012 15:14:20 +0000 (+0100) Subject: Bug 578762: When moving a bug into another product, the "Verify Bug Group" section... X-Git-Tag: bugzilla-4.5.1~311 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3a503abcdb34861e51841a4bf87af044a13acd4;p=thirdparty%2Fbugzilla.git Bug 578762: When moving a bug into another product, the "Verify Bug Group" section should not appear if no groups are applicable r/a=LpSolit --- diff --git a/template/en/default/bug/process/verify-new-product.html.tmpl b/template/en/default/bug/process/verify-new-product.html.tmpl index 45727901c6..77471cbcd4 100644 --- a/template/en/default/bug/process/verify-new-product.html.tmpl +++ b/template/en/default/bug/process/verify-new-product.html.tmpl @@ -100,7 +100,25 @@ [% IF verify_bug_groups %] -

Verify [% terms.Bug %] Group

+ [% mandatory_groups = [] %] + [% optional_groups = [] %] + + [% FOREACH gid = product.group_controls.keys %] + [% group = product.group_controls.$gid %] + [% NEXT UNLESS group.group.is_active %] + + [% IF group.membercontrol == constants.CONTROLMAPMANDATORY + || (group.othercontrol == constants.CONTROLMAPMANDATORY && !user.in_group(group.group.name)) %] + [% mandatory_groups.push(group) %] + [% ELSIF (group.membercontrol != constants.CONTROLMAPNA && user.in_group(group.group.name)) + || group.othercontrol != constants.CONTROLMAPNA %] + [% optional_groups.push(group) %] + [% END %] + [% END %] + + [% IF old_groups.size || optional_groups.size || mandatory_groups.size %] +

Verify [% terms.Bug %] Group

+ [% END %] [% IF old_groups.size %]

These groups are not legal for the '[% product.name FILTER html %]' @@ -118,21 +136,6 @@

[% END %] - [% mandatory_groups = [] %] - [% optional_groups = [] %] - - [% FOREACH gid = product.group_controls.keys %] - [% group = product.group_controls.$gid %] - [% NEXT UNLESS group.group.is_active %] - - [% IF group.membercontrol == constants.CONTROLMAPMANDATORY - || (group.othercontrol == constants.CONTROLMAPMANDATORY && !user.in_group(group.group.name)) %] - [% mandatory_groups.push(group) %] - [% ELSIF (group.membercontrol != constants.CONTROLMAPNA && user.in_group(group.group.name)) - || group.othercontrol != constants.CONTROLMAPNA %] - [% optional_groups.push(group) %] - [% END %] - [% END %] [% IF optional_groups.size %]

These groups are optional. You can decide to restrict [% terms.bugs %] to