Commit a1f34102 authored by terry%mozilla.org's avatar terry%mozilla.org

Oops! canconfirm bit wasn't actually working.

parent 21a4e6c9
...@@ -146,13 +146,8 @@ sub CheckCanChangeField { ...@@ -146,13 +146,8 @@ sub CheckCanChangeField {
"WHERE bug_id = $bugid"); "WHERE bug_id = $bugid");
($reporterid, $ownerid, $qacontactid) = (FetchSQLData()); ($reporterid, $ownerid, $qacontactid) = (FetchSQLData());
} }
if ($reporterid eq $whoid || $ownerid eq $whoid || $qacontactid eq $whoid) { if ($f eq "bug_status" && $newvalue ne $::unconfirmedstate &&
if ($f ne "bug_status") { IsOpenedState($newvalue)) {
return 1;
}
if ($newvalue eq $::unconfirmedstate || !IsOpenedState($newvalue)) {
return 1;
}
# Hmm. They are trying to set this bug to some opened state # Hmm. They are trying to set this bug to some opened state
# that isn't the UNCONFIRMED state. Are they in the right # that isn't the UNCONFIRMED state. Are they in the right
...@@ -165,16 +160,14 @@ sub CheckCanChangeField { ...@@ -165,16 +160,14 @@ sub CheckCanChangeField {
if ($UserInCanConfirmGroupSet) { if ($UserInCanConfirmGroupSet) {
return 1; return 1;
} }
my $fieldid = GetFieldID("bug_status"); SendSQL("SELECT everconfirmed FROM bugs WHERE bug_id = $bugid");
SendSQL("SELECT newvalue FROM bugs_activity " . my $everconfirmed = FetchOneColumn();
"WHERE fieldid = $fieldid " . if ($everconfirmed) {
" AND oldvalue = '$::unconfirmedstate'"); return 1;
while (MoreSQLData()) {
my $n = FetchOneColumn();
if (IsOpenedState($n) && $n ne $::unconfirmedstate) {
return 1;
}
} }
} elsif ($reporterid eq $whoid || $ownerid eq $whoid ||
$qacontactid eq $whoid) {
return 1;
} }
SendSQL("UNLOCK TABLES"); SendSQL("UNLOCK TABLES");
$oldvalue = value_quote($oldvalue); $oldvalue = value_quote($oldvalue);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment