Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
52cbd16e
Commit
52cbd16e
authored
Sep 26, 2013
by
Simon Green
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 769134 - Bugzilla unintentionally removes groups when changing products with multiple bugs
r=dkl, a=justdave
parent
646aa223
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
13 deletions
+62
-13
Bug.pm
Bugzilla/Bug.pm
+4
-0
verify-new-product.html.tmpl
template/en/default/bug/process/verify-new-product.html.tmpl
+58
-13
No files found.
Bugzilla/Bug.pm
View file @
52cbd16e
...
...
@@ -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
)
{
...
...
template/en/default/bug/process/verify-new-product.html.tmpl
View file @
52cbd16e
...
...
@@ -140,19 +140,64 @@
[% 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>
[% FOREACH group = optional_groups %]
<input type="hidden" name="defined_groups"
value="[% group.group.name FILTER html %]">
<input type="checkbox" id="group_[% group.group.id FILTER html %]"
name="groups"
[% ' checked="checked"' IF ((group.membercontrol == constants.CONTROLMAPDEFAULT && user.in_group(group.group.name))
|| (group.othercontrol == constants.CONTROLMAPDEFAULT && !user.in_group(group.group.name))
|| cgi.param("groups").contains(group.group.name)) %]
value="[% group.group.name FILTER html %]">
<label for="group_[% group.group.id FILTER html %]">
[% group.group.name FILTER html %]: [% group.group.description FILTER html %]
</label>
<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 %]">
<input type="checkbox" id="group_[% group.group.id FILTER html %]"
name="groups"
[% ' checked="checked"' IF ((group.membercontrol == constants.CONTROLMAPDEFAULT && user.in_group(group.group.name))
|| (group.othercontrol == constants.CONTROLMAPDEFAULT && !user.in_group(group.group.name))
|| cgi.param("groups").contains(group.group.name)) %]
value="[% group.group.name FILTER html %]">
<label for="group_[% group.group.id FILTER html %]">
[% group.group.name FILTER html %]: [% group.group.description FILTER html %]
</label>
<br>
[% END %]
[% END %]
</p>
[% END %]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment