Bug 769134 - Bugzilla unintentionally removes groups when changing products with multiple bugs
r=dkl, a=justdave git-svn-id: svn://10.0.0.236/trunk@265034 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
dea1da2dcc
commit
153f419c69
@ -1 +1 @@
|
||||
8755
|
||||
8756
|
||||
@ -2556,6 +2556,10 @@ sub _set_product {
|
||||
OR gcm.othercontrol != ?) )',
|
||||
undef, (@idlist, $product->id, CONTROLMAPNA, CONTROLMAPNA));
|
||||
$vars{'old_groups'} = Bugzilla::Group->new_from_list($gids);
|
||||
|
||||
# Did we come here from editing multiple bugs? (affects how we
|
||||
# show optional group changes)
|
||||
$vars{multiple_bugs} = Bugzilla->cgi->param('id') ? 0 : 1;
|
||||
}
|
||||
|
||||
if (%vars) {
|
||||
|
||||
@ -140,6 +140,50 @@
|
||||
[% IF optional_groups.size %]
|
||||
<p>These groups are optional. You can decide to restrict [% terms.bugs %] to
|
||||
one or more of the following groups:<br>
|
||||
[% IF multiple_bugs %]
|
||||
[% USE Bugzilla %]
|
||||
<script type="text/javascript">
|
||||
function turn_off(myself, id) {
|
||||
var other_checkbox = document.getElementById(id);
|
||||
if (myself.checked && other_checkbox) {
|
||||
other_checkbox.checked = false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<table border="1">
|
||||
<tr>
|
||||
<th>Remove<br>[% terms.bugs %]<br>from this<br>group</th>
|
||||
<th>Add<br>[% terms.bugs %]<br>to this<br>group</th>
|
||||
<th>Group Name:</th>
|
||||
</tr>
|
||||
|
||||
[% FOREACH group = optional_groups %]
|
||||
<tr>
|
||||
<td align="center">
|
||||
<input type="checkbox" name="defined_groups"
|
||||
id="defined_group_[% group.group.id FILTER html %]"
|
||||
value="[% group.group.name FILTER html %]"
|
||||
[% IF Bugzilla.cgi.param("defined_groups").contains(group.group.name) %] checked="checked"[% END %]
|
||||
onchange="turn_off(this, 'group_[% group.group.id FILTER html %]')">
|
||||
</td>
|
||||
<td align="center">
|
||||
<input type="checkbox" name="groups"
|
||||
id="group_[% group.group.id FILTER html %]"
|
||||
value="[% group.group.name FILTER html %]"
|
||||
[% IF Bugzilla.cgi.param("groups").contains(group.group.name) %] checked="checked"[% END %]
|
||||
onchange="turn_off(this, 'defined_group_[% group.group.id FILTER html %]')">
|
||||
</td>
|
||||
|
||||
<td>
|
||||
[% group.group.description FILTER html %]
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
[% END %]
|
||||
|
||||
</table>
|
||||
[% ELSE %]
|
||||
[% FOREACH group = optional_groups %]
|
||||
<input type="hidden" name="defined_groups"
|
||||
value="[% group.group.name FILTER html %]">
|
||||
@ -154,6 +198,7 @@
|
||||
</label>
|
||||
<br>
|
||||
[% END %]
|
||||
[% END %]
|
||||
</p>
|
||||
[% END %]
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user