diff options
author | bbaetz%student.usyd.edu.au <> | 2002-04-14 11:43:55 +0000 |
---|---|---|
committer | bbaetz%student.usyd.edu.au <> | 2002-04-14 11:43:55 +0000 |
commit | 7e50e09d81f366d2fc0c7e692d5f8dd8a49be18d (patch) | |
tree | ab678b9b30181708c90dcb10027f6dfd267f6183 | |
parent | 055ae240c20a7670009202a0b3013da9b7588c3e (diff) | |
download | bugs-7e50e09d81f366d2fc0c7e692d5f8dd8a49be18d.tar bugs-7e50e09d81f366d2fc0c7e692d5f8dd8a49be18d.tar.gz bugs-7e50e09d81f366d2fc0c7e692d5f8dd8a49be18d.tar.bz2 bugs-7e50e09d81f366d2fc0c7e692d5f8dd8a49be18d.tar.xz bugs-7e50e09d81f366d2fc0c7e692d5f8dd8a49be18d.zip |
Bug 110980 - no email to cc list when opening new bug
original patch by jake@bugzilla.org, merged to current sources by
bbaetz@student.usyd.edu.au
r=gerv, justdave
-rwxr-xr-x | post_bug.cgi | 20 | ||||
-rwxr-xr-x | processmail | 7 |
2 files changed, 25 insertions, 2 deletions
diff --git a/post_bug.cgi b/post_bug.cgi index ab817628e..dd6b5b366 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -242,6 +242,7 @@ SendSQL("INSERT INTO longdescs (bug_id, who, bug_when, thetext) my %ccids; my $ccid; +my @cc; # Add the CC list if (defined $::FORM{'cc'}) { @@ -251,15 +252,32 @@ if (defined $::FORM{'cc'}) { if ($ccid && !$ccids{$ccid}) { SendSQL("INSERT INTO cc (bug_id, who) VALUES ($id, $ccid)"); $ccids{$ccid} = 1; + push(@cc, $person); } } } } +# Assemble the -force* strings so this counts as "Added to this capacity" +my @ARGLIST = (); +if (@cc) { + push (@ARGLIST, "-forcecc", join(",", @cc)); +} + +push (@ARGLIST, "-forceowner", DBID_to_name($::FORM{assigned_to})); + +if (defined $::FORM{qacontact}) { + push (@ARGLIST, "-forceqacontact", DBID_to_name($::FORM{qacontact})); +} + +push (@ARGLIST, "-forcereporter", DBID_to_name($::userid)); + +push (@ARGLIST, $id, $::COOKIE{'Bugzilla_login'}); + # Send mail to let people know the bug has been created. # See attachment.cgi for explanation of why it's done this way. my $mailresults = ''; -open(PMAIL, "-|") or exec('./processmail', $id, $::COOKIE{'Bugzilla_login'}); +open(PMAIL, "-|") or exec('./processmail', @ARGLIST); $mailresults .= $_ while <PMAIL>; close(PMAIL); diff --git a/processmail b/processmail index e8509a6df..3ddf28d94 100755 --- a/processmail +++ b/processmail @@ -818,10 +818,15 @@ if ($#ARGV >= 0 && $ARGV[0] eq "-forceqacontact") { @{$force{'QAcontact'}} = (trim(shift(@ARGV))); } +if ($#ARGV >= 0 && $ARGV[0] eq "-forcereporter") { + shift(@ARGV); + @{$force{'Reporter'}} = trim(shift(@ARGV)); +} + if (($#ARGV < 0) || ($#ARGV > 1)) { print "Usage:\n processmail {bugid} {nametoexclude} " . "[-forcecc list,of,users]\n [-forceowner name] " . - "[-forceqacontact name]\nor\n" . + "[-forceqacontact name]\n [-forcereporter name]\nor\n" . " processmail rescanall\n"; exit; } |