]> 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:16:33 +0000 (00:16 +0000)
committerjustdave%bugzilla.org <>
Thu, 11 Sep 2008 00:16:33 +0000 (00:16 +0000)
Patch by justdave/LpSolit, r=LpSolit/justdave, a=LpSolit

Bugzilla/Bug.pm

index ad1ffc4444756c8f19d706b93c578a02283163b6..ffae17895f98947985e555f1090c7704622fa491 100644 (file)
@@ -942,7 +942,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.