summaryrefslogtreecommitdiffstats
path: root/post_bug.cgi
diff options
context:
space:
mode:
authorgerv%gerv.net <>2002-08-20 07:47:06 +0200
committergerv%gerv.net <>2002-08-20 07:47:06 +0200
commite7e9e5c5cb454abbf92e1b8e1a4e43bd01f4c79c (patch)
treea185a42a7f53372a23a168a6f101822d113e8234 /post_bug.cgi
parenta1ba12e2936512aab4138815cde2b8c284362da5 (diff)
downloadbugzilla-e7e9e5c5cb454abbf92e1b8e1a4e43bd01f4c79c.tar.gz
bugzilla-e7e9e5c5cb454abbf92e1b8e1a4e43bd01f4c79c.tar.xz
Bug 163457 - bugs not registered as "new". Patch by gerv; r=timeless, bbaetz.
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-xpost_bug.cgi17
1 files changed, 5 insertions, 12 deletions
diff --git a/post_bug.cgi b/post_bug.cgi
index 9d3c0cca9..55ee27301 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()) {