diff --git a/webtools/bugzilla/buglist.cgi b/webtools/bugzilla/buglist.cgi index ea3ec2049815..12bb84922d8b 100755 --- a/webtools/bugzilla/buglist.cgi +++ b/webtools/bugzilla/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"; + } }