summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorjustdave%bugzilla.org <>2008-09-11 02:21:29 +0200
committerjustdave%bugzilla.org <>2008-09-11 02:21:29 +0200
commit0e194f1266c1189ceb63a8c61660bddf8c48731e (patch)
tree9459d99b59062cc61f018287443b7a8b16ecee7f /Bugzilla
parent4fdb67308b0e095aa76e36581cc4e94357d61f6a (diff)
downloadbugzilla-0e194f1266c1189ceb63a8c61660bddf8c48731e.tar.gz
bugzilla-0e194f1266c1189ceb63a8c61660bddf8c48731e.tar.xz
Bug 452793 part 2: On bug creation, the first confirmed bug status should be selected by default for users with canconfirm privs, even if UNCONFIRMED is the bug status with the lowest sortkey -- do this when the template doesn't specify a status also (first patch only fixed the default templates).
Patch by justdave/LpSolit, r=LpSolit/justdave, a=LpSolit
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Bug.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 14f781c42..6f22d967c 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -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.