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

index 93035dbf2b0000b71a8888085fe411228b9b35d0..610a7c0f6860827af3caad50f036a1d08ccb36c8 100644 (file)
@@ -1026,7 +1026,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.