]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Better fix for bug 452799, r=justdave
authorlpsolit%gmail.com <>
Sat, 30 Aug 2008 04:57:02 +0000 (04:57 +0000)
committerlpsolit%gmail.com <>
Sat, 30 Aug 2008 04:57:02 +0000 (04:57 +0000)
Bugzilla/Bug.pm

index 6a59463e1904774cc3a92367f5ca55e11fded1c9..37e4ff5bc2eedf2ea687d01b2e88ba5b66ccb9e1 100644 (file)
@@ -948,7 +948,12 @@ sub _check_bug_status {
             # A user with no privs cannot choose the initial status.
             # If UNCONFIRMED is valid for this product, use it; else
             # use the first bug status available.
-            $new_status = $product->votes_to_confirm ? 'UNCONFIRMED' : $valid_statuses[0];
+            if (grep {$_->name eq 'UNCONFIRMED'} @valid_statuses) {
+                $new_status = 'UNCONFIRMED';
+            }
+            else {
+                $new_status = $valid_statuses[0];
+            }
         }
     }
     # Time to validate the bug status.