From: gerv%gerv.net <> Date: Tue, 20 Aug 2002 05:47:06 +0000 (+0000) Subject: Bug 163457 - bugs not registered as "new". Patch by gerv; r=timeless, bbaetz. X-Git-Tag: bugzilla-2.17.1~180 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7e9e5c5cb454abbf92e1b8e1a4e43bd01f4c79c;p=thirdparty%2Fbugzilla.git Bug 163457 - bugs not registered as "new". Patch by gerv; r=timeless, bbaetz. --- diff --git a/post_bug.cgi b/post_bug.cgi index 9d3c0cca93..55ee273017 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -148,18 +148,11 @@ if (Param("useqacontact")) { } } -if (exists $::FORM{'bug_status'}) { - # Ignore the given status, so that we can set it to UNCONFIRMED - # or NEW, depending on votestoconfirm if either the given state was - # unconfirmed (so that a user can't override the below check), or if - # the user doesn't have permission to change the default status anyway - if ($::FORM{'bug_status'} eq $::unconfirmedstate - || (!UserInGroup("canedit") && !UserInGroup("canconfirm"))) { - delete $::FORM{'bug_status'}; - } -} - -if (!exists $::FORM{'bug_status'}) { +if (UserInGroup("canedit") || UserInGroup("canconfirm")) { + # Default to NEW if the user hasn't selected another status + $::FORM{'bug_status'} ||= "NEW"; +} else { + # Default to UNCONFIRMED if we are using it, NEW otherwise $::FORM{'bug_status'} = $::unconfirmedstate; SendSQL("SELECT votestoconfirm FROM products WHERE id = $product_id"); if (!FetchOneColumn()) {