From: lpsolit%gmail.com <> Date: Sat, 30 Aug 2008 07:43:58 +0000 (+0000) Subject: Bug 452793: On bug creation, the first confirmed bug status should be selected by... X-Git-Tag: bugzilla-3.2rc2~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29491814a9c454fbe2da5c5b24b48aa57c9290ba;p=thirdparty%2Fbugzilla.git 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 r=justdave a=LpSolit --- diff --git a/enter_bug.cgi b/enter_bug.cgi index ee362e3020..9ca3646d45 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