From 9de3481eb1733f20b1ceac522fcc94ea0d4f27c2 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 20 Jun 2007 18:03:04 +0000 Subject: Bug 347213: When moving a bug to another product, Bugzilla should let us preemptively put the bug into a (valid) group which is not a default one for this product MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug 303183: Bugzilla fails to warn when a product change would force the removal of an optional group Patch by Frédéric Buclin r=mkanat a=LpSolit --- .../bug/process/verify-new-product.html.tmpl | 93 ++++++++++++++++------ 1 file changed, 69 insertions(+), 24 deletions(-) (limited to 'template/en/default') 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 2355f7506..ddca10393 100644 --- a/template/en/default/bug/process/verify-new-product.html.tmpl +++ b/template/en/default/bug/process/verify-new-product.html.tmpl @@ -17,20 +17,16 @@ # Rights Reserved. # # Contributor(s): Myk Melez + # Frédéric Buclin #%] [%# INTERFACE: - # verify_fields: boolean; whether or not to verify - # the version, component, and target milestone fields + # product: object; the new product. # versions: array; versions for the new product. # components: array; components for the new product. # milestones: array; milestones for the new product. # defaults: hash; keys are names of fields, values are defaults for # those fields - # verify_bug_group: boolean; whether or not to ask the user - # if they want to add the bug to its new product's group - # use_target_milestone: boolean; whether or not to use - # the target milestone field #%] [%# The global Bugzilla->cgi object is used to obtain form variable values. %] @@ -45,15 +41,14 @@
[% PROCESS "global/hidden-fields.html.tmpl" - exclude=(verify_fields ? "^version|component|target_milestone$" : "") %] + exclude=("^version|component|target_milestone|bit-\\d+$") %] [%# Verify the version, component, and target milestone fields. %] -[% IF verify_fields %] -

Verify Version, Component[% ", Target Milestone" IF use_target_milestone %]

+

Verify Version, Component[% ", Target Milestone" IF Param("usetargetmilestone") %]

- [% IF use_target_milestone %] + [% IF Param("usetargetmilestone") %] You are moving the [% terms.bug %](s) to the product [% cgi.param("product") FILTER html %], and the version, component, and/or target milestone fields are no longer @@ -84,7 +79,7 @@ default=defaults.component size=10 %] - [% IF use_target_milestone %] + [% IF Param("usetargetmilestone") %] Target Milestone:
[% PROCESS "global/select-menu.html.tmpl" @@ -97,22 +92,72 @@ -[% END %] - -[% IF verify_bug_group %]

Verify [% terms.Bug %] Group

-

- Do you want to add the [% terms.bug %] to its new product's default groups (if any)? -

+ [% IF old_groups.size %] +

These groups are not legal for the '[% product.name FILTER html %]' + product or you are not allowed to restrict [% terms.bugs %] to these groups. + [%+ terms.Bugs %] will no longer be restricted to these groups and may become + public if no other group applies:
+ [% FOREACH group = old_groups %] + + +
+ [% END %] +

+ [% END %] -

- no
- yes
- - yes, but only if the [% terms.bug %] was in any of its old product's default groups
-

-[% 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 + one or more of the following groups:
+ [% FOREACH group = optional_groups %] + + +
+ [% END %] +

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

These groups are mandatory and [% terms.bugs %] will be automatically + restricted to these groups:
+ [% FOREACH group = mandatory_groups %] + + +
+ [% END %] +

+ [% END %] -- cgit v1.2.3-24-g4f1b