From e9a32920f47ce268e3835b12abccc9fb2e1dd8c6 Mon Sep 17 00:00:00 2001 From: "terry%mozilla.org" <> Date: Thu, 17 Feb 2000 13:15:20 +0000 Subject: Major spankage. Added a new state, UNCONFIRMED. Added new groups, "editbugs" and "canconfirm". People without these states are now much more limited in what they can do. For backwards compatability, by default all users will have the editbugs and canconfirm bits on them. Installing this changes as is should only have one major visible effect -- an UNCONFIRMED state will appear in the query page. But no bugs will become in that state, until you tweak some of the new voting-related parameters you'll find when editing products. --- bug_form.pl | 100 ++++++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 67 insertions(+), 33 deletions(-) (limited to 'bug_form.pl') diff --git a/bug_form.pl b/bug_form.pl index c5cfd96e2..520949a36 100644 --- a/bug_form.pl +++ b/bug_form.pl @@ -31,13 +31,13 @@ sub bug_form_pl_sillyness { $zz = %::components; $zz = %::prodmaxvotes; $zz = %::versions; + $zz = @::legal_keywords; $zz = @::legal_opsys; $zz = @::legal_platform; $zz = @::legal_product; $zz = @::legal_priority; $zz = @::legal_resolution_no_dup; $zz = @::legal_severity; - $zz = @::keywordsbyname; } my %knownattachments; @@ -194,14 +194,27 @@ if (@row = FetchSQLData()) { exit; } +my $assignedtoid = $bug{'assigned_to'}; +my $reporterid = $bug{'reporter'}; +my $qacontactid = $bug{'qa_contact'}; + $bug{'assigned_to'} = DBID_to_name($bug{'assigned_to'}); $bug{'reporter'} = DBID_to_name($bug{'reporter'}); + +print qq{
\n}; + +# foreach my $i (sort(keys(%bug))) { +# my $q = value_quote($bug{$i}); +# print qq{\n}; +# } + $bug{'long_desc'} = GetLongDescription($id); my $longdesclength = length($bug{'long_desc'}); - GetVersionTable(); + + # # These should be read from the database ... # @@ -229,11 +242,9 @@ if (defined $URL && $URL ne "none" && $URL ne "NULL" && $URL ne "") { } print " - - @@ -449,50 +460,73 @@ my $knum = 1; my $status = $bug{'bug_status'}; -if ($status eq "NEW" || $status eq "ASSIGNED" || $status eq "REOPENED") { - if ($status ne "ASSIGNED") { - print ""; - print "Accept bug (change status to ASSIGNED)
"; - $knum++; - } - if ($bug{'resolution'} ne "") { - print "\n"; - print "Clear the resolution (remove the current resolution of\n"; - print "$bug{'resolution'})
\n"; +my $canedit = UserInGroup("editbugs"); +my $canconfirm; + +if ($status eq $::unconfirmedstate) { + $canconfirm = UserInGroup("canconfirm"); + if ($canedit || $canconfirm) { + print ""; + print "Confirm bug (change status to NEW)
"; $knum++; } - print " +} + + +if ($::userid && ($canedit || $::userid == $assignedtoid || + $::userid == $reporterid || $::userid == $qacontactid)) { + if (IsOpenedState($status)) { + if ($status ne "ASSIGNED") { + print ""; + my $extra = ""; + if ($status eq $::unconfirmedstate && ($canconfirm || $canedit)) { + $extra = "confirm bug, "; + } + print "Accept bug (${extra}change status to ASSIGNED)
"; + $knum++; + } + if ($bug{'resolution'} ne "") { + print "\n"; + print "Clear the resolution (remove the current resolution of\n"; + print "$bug{'resolution'})
\n"; + $knum++; + } + print " Resolve bug, changing resolution to
\n"; - $knum++; - print " + $knum++; + print " Resolve bug, mark it as duplicate of bug #
\n"; - $knum++; - my $assign_element = ""; + $knum++; + my $assign_element = ""; - print " + print "Reassign bug to $assign_element
\n"; - $knum++; - print " + if ($status eq $::unconfirmedstate && ($canconfirm || $canedit)) { + print "     and confirm bug (change status to NEW)
"; + } + $knum++; + print " Reassign bug to owner of selected component
\n"; - $knum++; -} else { - print " Reopen bug
\n"; - $knum++; - if ($status eq "RESOLVED") { - print " - Mark bug as VERIFIED
\n"; $knum++; - } - if ($status ne "CLOSED") { - print " - Mark bug as CLOSED
\n"; + } else { + print " Reopen bug
\n"; $knum++; + if ($status eq "RESOLVED") { + print " + Mark bug as VERIFIED
\n"; + $knum++; + } + if ($status ne "CLOSED") { + print " + Mark bug as CLOSED
\n"; + $knum++; + } } } -- cgit v1.2.3-24-g4f1b
Bug#:$bug{'bug_id'} Platform: