From 6d307a92230b025dd7eefba00d593f1eff430b5f Mon Sep 17 00:00:00 2001 From: "justdave%syndicomm.com" <> Date: Sun, 22 Jul 2001 07:22:36 +0000 Subject: Fix for bug 84714 and bug 88797: You can now change bug groups from the "change several bugs" form even if the bugs aren't all in the same groups. Also, the groups are no longer cleared when you make a change from the "change several bugs" form (unless you tell it to) Patch by Joe Robins and Dave Miller r= zach@zachlipton.com a= justdave@syndicomm.com --- buglist.cgi | 67 ++++++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 21 deletions(-) diff --git a/buglist.cgi b/buglist.cgi index ea3ec2049..12bb84922 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -1154,7 +1154,6 @@ my %seen; my @bugarray; my %prodhash; my %statushash; -my $buggroupset = ""; my %ownerhash; my $pricol = -1; @@ -1174,14 +1173,6 @@ my @weekday= qw( Sun Mon Tue Wed Thu Fri Sat ); while (@row = FetchSQLData()) { my $bug_id = shift @row; my $g = shift @row; # Bug's group set. - if ($buggroupset eq "") { - $buggroupset = $g; - } elsif ($buggroupset ne $g) { - $buggroupset = "x"; # We only play games with tweaking the - # buggroupset if all the bugs have exactly - # the same group. If they don't, we leave - # it alone. - } if (!defined $seen{$bug_id}) { $seen{$bug_id} = 1; $count++; @@ -1460,22 +1451,56 @@ document.write(\"
"; -if ($::usergroupset ne '0' && $buggroupset =~ /^\d+$/) { - SendSQL("select bit, description, (bit & $buggroupset != 0) from groups where bit & $::usergroupset != 0 and isbuggroup != 0 order by description"); +if($::usergroupset ne '0') { + SendSQL("select bit, name, description, isactive ". + "from groups where bit & $::usergroupset != 0 ". + "and isbuggroup != 0 ". + "order by description"); # We only print out a header bit for this section if there are any # results. - if(MoreSQLData()) { - print "
Only users in the selected groups can view this bug:
\n"; - } + my $groupFound = 0; + my $inactiveFound = 0; while (MoreSQLData()) { - my ($bit, $description, $ison) = (FetchSQLData()); - # Modifying this to use checkboxes instead - my $checked = $ison ? " CHECKED" : ""; - # indent these a bit - print "    "; - print "\n"; - print "$description
\n"; + my ($bit, $groupname, $description, $isactive) = (FetchSQLData()); + if(($prodhash{$groupname}) || (!defined($::proddesc{$groupname}))) { + if(!$groupFound) { + print "Groupset:
\n"; + print "\n"; + print "\n"; + $groupFound = 1; + } + # Modifying this to use radio buttons instead + print ""; + print "\n"; + print "\n"; + if ($isactive) { + print "\n"; + } else { + $inactiveFound = 1; + print "\n"; + } + print "\n"; + } + } + # Add in some blank space for legibility + if($groupFound) { + print "
Don't
change
this group
restriction\n"; + print "
Remove
bugs
from this
group\n"; + print "
Add
bugs
to this
group\n"; + print "
Group name:
 "; + if(!$isactive) { + print ""; + } + print "$description"; + if(!$isactive) { + print ""; + } + print "
\n"; + if ($inactiveFound) { + print "(Note: Bugs may not be added to inactive groups (italicized), only removed)
\n"; } + print "

\n"; + } } -- cgit v1.2.3-24-g4f1b