From be5e52c9541f9d3e9f3dbb91664e13eb62fa1617 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" Date: Sat, 30 Aug 2008 02:43:58 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20452793:=20On=20bug=20creation,=20the=20fi?= =?UTF-8?q?rst=20confirmed=20bug=20status=20should=20be=20selected=20by=20?= =?UTF-8?q?default=20for=20users=20with=20canconfirm=20privs,=20even=20if?= =?UTF-8?q?=20UNCONFIRMED=20is=20the=20bug=20status=20with=20the=20lowest?= =?UTF-8?q?=20sortkey=20-=20Patch=20by=20Fr=C3=83=C2=A9d=C3=83=C2=A9ric=20?= =?UTF-8?q?Buclin=20=20r=3Djustdave=20a=3DLpSolit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://10.0.0.236/trunk@253952 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/enter_bug.cgi | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mozilla/webtools/bugzilla/enter_bug.cgi b/mozilla/webtools/bugzilla/enter_bug.cgi index 9ee58ea53cc..ae1a038711a 100755 --- a/mozilla/webtools/bugzilla/enter_bug.cgi +++ b/mozilla/webtools/bugzilla/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