summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbbaetz%student.usyd.edu.au <>2002-04-16 17:29:01 +0200
committerbbaetz%student.usyd.edu.au <>2002-04-16 17:29:01 +0200
commit20c30bdcfbe368242694b297cf6d4b697b739257 (patch)
treebc4160a5417d3cf8bc815fb020293b240d16eb67
parentc594d00a40b52ef03e46e1499d74c55065b52857 (diff)
downloadbugzilla-20c30bdcfbe368242694b297cf6d4b697b739257.tar.gz
bugzilla-20c30bdcfbe368242694b297cf6d4b697b739257.tar.xz
bug 117718 - Mass Change removes a bugs groupset if the bug was in the
wrong product group r=justdave x2
-rwxr-xr-xprocess_bug.cgi16
1 files changed, 12 insertions, 4 deletions
diff --git a/process_bug.cgi b/process_bug.cgi
index fe9163eef..ebdf43b77 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -445,10 +445,18 @@ if($::usergroupset ne '0') {
SendSQL("SELECT bit, isactive FROM groups WHERE " .
"isbuggroup != 0 AND bit & $::usergroupset != 0 ORDER BY bit");
while (my ($b, $isactive) = FetchSQLData()) {
- if (!$::FORM{"bit-$b"}) {
- $groupDel .= "+$b";
- } elsif ($::FORM{"bit-$b"} == 1 && $isactive) {
- $groupAdd .= "+$b";
+ # The multiple change page may not show all groups a bug is in
+ # (eg product groups when listing more than one product)
+ # Only consider groups which were present on the form. We can't do this
+ # for single bug changes because non-checked checkboxes aren't present.
+ # All the checkboxes should be shown in that case, though, so its not
+ # an issue there
+ if ($::FORM{'id'} || exists $::FORM{"bit-$b"}) {
+ if (!$::FORM{"bit-$b"}) {
+ $groupDel .= "+$b";
+ } elsif ($::FORM{"bit-$b"} == 1 && $isactive) {
+ $groupAdd .= "+$b";
+ }
}
}
if ($groupAdd ne "0" || $groupDel ne "0") {