summaryrefslogtreecommitdiffstats
path: root/post_bug.cgi
diff options
context:
space:
mode:
authortravis%sedsystems.ca <>2005-02-26 02:10:32 +0100
committertravis%sedsystems.ca <>2005-02-26 02:10:32 +0100
commita0d0ee270e7723f335945ec1ce09dd8efa65ff89 (patch)
tree18cd4c7aa1d38c25b1668434d7a983d3e12e7a87 /post_bug.cgi
parent5d8f3d8e3d5309dbdbb86ab65c7712f370e861fa (diff)
downloadbugzilla-a0d0ee270e7723f335945ec1ce09dd8efa65ff89.tar.gz
bugzilla-a0d0ee270e7723f335945ec1ce09dd8efa65ff89.tar.xz
Bug 36257 : Have the QA Contact field appear in New Bug submission form
Patch by Shane H. W. Travis <travis@sedsystems.ca> r=LpSolit a=justdave
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-xpost_bug.cgi14
1 files changed, 11 insertions, 3 deletions
diff --git a/post_bug.cgi b/post_bug.cgi
index 4f545fbb2..6b52b447d 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -63,6 +63,7 @@ my $dbh = Bugzilla->dbh;
&Bugzilla::User::match_field ({
'cc' => { 'type' => 'multi' },
'assigned_to' => { 'type' => 'single' },
+ 'qa_contact' => { 'type' => 'single' },
});
# The format of the initial comment can be structured by adding fields to the
@@ -142,10 +143,17 @@ my @bug_fields = ("version", "rep_platform",
"bug_status", "bug_file_loc", "short_desc",
"target_milestone", "status_whiteboard");
+# Retrieve the default QA contact if the field is empty
if (Param("useqacontact")) {
- SendSQL("SELECT initialqacontact FROM components " .
- "WHERE id = $component_id");
- my $qa_contact = FetchOneColumn();
+ my $qa_contact;
+ if (!UserInGroup("editbugs") || trim($::FORM{'qa_contact'}) eq "") {
+ SendSQL("SELECT initialqacontact FROM components " .
+ "WHERE id = $component_id");
+ $qa_contact = FetchOneColumn();
+ } else {
+ $qa_contact = DBNameToIdAndCheck(trim($::FORM{'qa_contact'}));
+ }
+
if (defined $qa_contact && $qa_contact != 0) {
$::FORM{'qa_contact'} = $qa_contact;
push(@bug_fields, "qa_contact");