summaryrefslogtreecommitdiffstats
path: root/enter_bug.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-08-30 09:41:59 +0200
committerlpsolit%gmail.com <>2008-08-30 09:41:59 +0200
commit7828df1ce0c9e89d96210f80c0ae499d68999064 (patch)
tree56ad7d4d70baab2bfabad52cfa94983ba3f3a182 /enter_bug.cgi
parentd7febc0f1c59ee5bd65d8b8956ad9b04fa8cfc8b (diff)
downloadbugzilla-7828df1ce0c9e89d96210f80c0ae499d68999064.tar.gz
bugzilla-7828df1ce0c9e89d96210f80c0ae499d68999064.tar.xz
Bug 452793: 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 - Patch by Frédéric Buclin <LpSolit@gmail.com> r=justdave a=LpSolit
Diffstat (limited to 'enter_bug.cgi')
-rwxr-xr-xenter_bug.cgi10
1 files changed, 7 insertions, 3 deletions
diff --git a/enter_bug.cgi b/enter_bug.cgi
index 9ee58ea53..ae1a03871 100755
--- a/enter_bug.cgi
+++ b/enter_bug.cgi
@@ -517,14 +517,18 @@ unless ($has_editbugs || $has_canconfirm) {
$vars->{'bug_status'} = \@status;
# Get the default from a template value if it is legitimate.
-# Otherwise, set the default to the first item on the list.
+# Otherwise, and only if the user has privs, set the default
+# to the first confirmed bug status on the list, if available.
if (formvalue('bug_status') && (lsearch(\@status, formvalue('bug_status')) >= 0)) {
$default{'bug_status'} = formvalue('bug_status');
-} else {
+} elsif (scalar @status == 1) {
$default{'bug_status'} = $status[0];
}
-
+else {
+ $default{'bug_status'} = ($status[0] ne 'UNCONFIRMED') ? $status[0] : $status[1];
+}
+
my $grouplist = $dbh->selectall_arrayref(
q{SELECT DISTINCT groups.id, groups.name, groups.description,
membercontrol, othercontrol