]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 293901: cannot specify the QA contact using bug_email.pl - Patch by Frédéric...
authorlpsolit%gmail.com <>
Fri, 13 May 2005 02:13:56 +0000 (02:13 +0000)
committerlpsolit%gmail.com <>
Fri, 13 May 2005 02:13:56 +0000 (02:13 +0000)
contrib/bug_email.pl

index ad74c748f8b8d19b8bb24fd7b482891c7e1ac8e5..46c23c3c37cc07318ab0814dc15b8be0552cea74 100755 (executable)
@@ -38,7 +38,7 @@
 #
 # You need to work with bug_email.pl the MIME::Parser installed.
 # 
-# $Id: bug_email.pl,v 1.26 2005/05/12 17:26:26 lpsolit%gmail.com Exp $
+# $Id: bug_email.pl,v 1.27 2005/05/12 19:13:56 lpsolit%gmail.com Exp $
 ###############################################################
 
 # 02/12/2000 (SML)
@@ -827,10 +827,15 @@ if (! CheckPermissions("CreateBugs", $SenderShort ) ) {
 
 # Set QA
 if (Param("useqacontact")) {
-    SendSQL("select initialqacontact from components, products where components.product_id = products.id AND products.name=" .
-            SqlQuote($Control{'product'}) .
-            " and components.name=" . SqlQuote($Control{'component'}));
-    $Control{'qa_contact'} = FetchOneColumn();
+    if (defined($Control{'qa_contact'}) 
+        && $Control{'qa_contact'} !~ /^\s*$/ ) {
+        $Control{'qa_contact'} = DBname_to_id($Control{'qa_contact'});
+    } else {
+        SendSQL("select initialqacontact from components, products where components.product_id = products.id AND products.name=" .
+                SqlQuote($Control{'product'}) .
+                " and components.name=" . SqlQuote($Control{'component'}));
+        $Control{'qa_contact'} = FetchOneColumn();
+    }
 }
 
 # Set Assigned - assigned_to depends on the product, cause initialowner