]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 452793 part 2: On bug creation, the first confirmed bug status should be selected...
authorjustdave%bugzilla.org <>
Thu, 11 Sep 2008 00:21:29 +0000 (00:21 +0000)
committerjustdave%bugzilla.org <>
Thu, 11 Sep 2008 00:21:29 +0000 (00:21 +0000)
Patch by justdave/LpSolit, r=LpSolit/justdave, a=LpSolit

Bugzilla/Bug.pm

index 14f781c42f3c4db528e8dcbf18e1151cc4f4c7f4..6f22d967c45cba5fab9df03b63b8be43ae6dcbff 100644 (file)
@@ -1020,7 +1020,15 @@ sub _check_bug_status {
             || $user->in_group('canconfirm', $product->id)) {
             # If the user with privs hasn't selected another status,
             # select the first one of the list.
-            $new_status ||= $valid_statuses[0];
+            unless ($new_status) {
+                if (scalar(@valid_statuses) == 1) {
+                    $new_status = $valid_statuses[0];
+                }
+                else {
+                    $new_status = ($valid_statuses[0]->name ne 'UNCONFIRMED') ?
+                                  $valid_statuses[0] : $valid_statuses[1];
+                }
+            }
         }
         else {
             # A user with no privs cannot choose the initial status.