summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterry%mozilla.org <>2000-03-08 06:29:19 +0100
committerterry%mozilla.org <>2000-03-08 06:29:19 +0100
commita1f341024427582cf8a7988442614d1b0f4bf61f (patch)
tree74e33707baf690e461e09d259ad8f008412268cd
parent21a4e6c98f6fee863721f11cc0e6a209a0f3e04a (diff)
downloadbugzilla-a1f341024427582cf8a7988442614d1b0f4bf61f.tar.gz
bugzilla-a1f341024427582cf8a7988442614d1b0f4bf61f.tar.xz
Oops! canconfirm bit wasn't actually working.
-rwxr-xr-xprocess_bug.cgi25
1 files changed, 9 insertions, 16 deletions
diff --git a/process_bug.cgi b/process_bug.cgi
index ae55fd8da..0e11f16cc 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -146,13 +146,8 @@ sub CheckCanChangeField {
"WHERE bug_id = $bugid");
($reporterid, $ownerid, $qacontactid) = (FetchSQLData());
}
- if ($reporterid eq $whoid || $ownerid eq $whoid || $qacontactid eq $whoid) {
- if ($f ne "bug_status") {
- return 1;
- }
- if ($newvalue eq $::unconfirmedstate || !IsOpenedState($newvalue)) {
- return 1;
- }
+ if ($f eq "bug_status" && $newvalue ne $::unconfirmedstate &&
+ IsOpenedState($newvalue)) {
# Hmm. They are trying to set this bug to some opened state
# that isn't the UNCONFIRMED state. Are they in the right
@@ -165,16 +160,14 @@ sub CheckCanChangeField {
if ($UserInCanConfirmGroupSet) {
return 1;
}
- my $fieldid = GetFieldID("bug_status");
- SendSQL("SELECT newvalue FROM bugs_activity " .
- "WHERE fieldid = $fieldid " .
- " AND oldvalue = '$::unconfirmedstate'");
- while (MoreSQLData()) {
- my $n = FetchOneColumn();
- if (IsOpenedState($n) && $n ne $::unconfirmedstate) {
- return 1;
- }
+ SendSQL("SELECT everconfirmed FROM bugs WHERE bug_id = $bugid");
+ my $everconfirmed = FetchOneColumn();
+ if ($everconfirmed) {
+ return 1;
}
+ } elsif ($reporterid eq $whoid || $ownerid eq $whoid ||
+ $qacontactid eq $whoid) {
+ return 1;
}
SendSQL("UNLOCK TABLES");
$oldvalue = value_quote($oldvalue);