diff options
author | terry%mozilla.org <> | 1999-07-08 09:21:33 +0200 |
---|---|---|
committer | terry%mozilla.org <> | 1999-07-08 09:21:33 +0200 |
commit | 5983f96e34309a59909f07145f7a78b0dd12e639 (patch) | |
tree | 9568df226e8259de93367b7d57737ddde241d93a /post_bug.cgi | |
parent | d56727763be63a52ad47d023ca7c44de9a684ac9 (diff) | |
download | bugzilla-5983f96e34309a59909f07145f7a78b0dd12e639.tar.gz bugzilla-5983f96e34309a59909f07145f7a78b0dd12e639.tar.xz |
Enable custom bug creation pages that try to set more fields than
enter_bug.cgi does.
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-x | post_bug.cgi | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/post_bug.cgi b/post_bug.cgi index e98767b1b..d31a73774 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -78,7 +78,8 @@ $::FORM{'reporter'} = DBNameToIdAndCheck($::FORM{'reporter'}); my @bug_fields = ("reporter", "product", "version", "rep_platform", "bug_severity", "priority", "op_sys", "assigned_to", - "bug_status", "bug_file_loc", "short_desc", "component"); + "bug_status", "bug_file_loc", "short_desc", "component", + "status_whiteboard", "target_milestone"); if (Param("useqacontact")) { SendSQL("select initialqacontact from components where program=" . @@ -93,15 +94,20 @@ if (Param("useqacontact")) { +my @used_fields; +foreach my $f (@bug_fields) { + if (exists $::FORM{$f}) { + push (@used_fields, $f); + } +} - -my $query = "insert into bugs (\n" . join(",\n", @bug_fields) . ", +my $query = "insert into bugs (\n" . join(",\n", @used_fields) . ", creation_ts, long_desc ) values ( "; -foreach my $field (@bug_fields) { +foreach my $field (@used_fields) { $query .= SqlQuote($::FORM{$field}) . ",\n"; } |