From: lpsolit%gmail.com <> Date: Thu, 30 Jun 2005 07:03:20 +0000 (+0000) Subject: Bug 289382: Incorrect dependency bugmail recipients on bug creation - Patch by Teemu... X-Git-Tag: bugzilla-2.18.2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=96157994553f89918fb9c80f85f3285b6b3d6608;p=thirdparty%2Fbugzilla.git Bug 289382: Incorrect dependency bugmail recipients on bug creation - Patch by Teemu Mannermaa r=gerv a=justdave --- diff --git a/post_bug.cgi b/post_bug.cgi index 514e57a311..66d5cd7422 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -471,15 +471,14 @@ if (UserInGroup("editbugs")) { } } -# Email everyone the details of the new bug -$vars->{'mailrecipients'} = { 'cc' => \@cc, - 'owner' => DBID_to_name($::FORM{'assigned_to'}), - 'reporter' => $::COOKIE{'Bugzilla_login'}, - 'changer' => $::COOKIE{'Bugzilla_login'} }; +# Gather everyone interested in the details of the new bug (forced recipients) +my $mailrecipients = { 'cc' => \@cc, + 'owner' => DBID_to_name($::FORM{'assigned_to'}), + 'reporter' => $::COOKIE{'Bugzilla_login'}, + 'changer' => $::COOKIE{'Bugzilla_login'} }; if (defined $::FORM{'qa_contact'}) { - $vars->{'mailrecipients'}->{'qacontact'} = - DBID_to_name($::FORM{'qa_contact'}); + $mailrecipients->{'qacontact'} = DBID_to_name($::FORM{'qa_contact'}); } $vars->{'id'} = $id; @@ -492,10 +491,17 @@ $vars->{'sentmail'} = []; push (@{$vars->{'sentmail'}}, { type => 'created', id => $id, + mailrecipients => $mailrecipients }); foreach my $i (@all_deps) { - push (@{$vars->{'sentmail'}}, { type => 'dep', id => $i, }); + push (@{$vars->{'sentmail'}}, { type => 'dep', + id => $i, + mailrecipients => { + # Only force changer for dep BugMail + 'changer' => $::COOKIE{'Bugzilla_login'} + } + }); } my @bug_list; diff --git a/template/en/default/bug/create/created.html.tmpl b/template/en/default/bug/create/created.html.tmpl index 312d7f70bc..c55c1fd475 100644 --- a/template/en/default/bug/create/created.html.tmpl +++ b/template/en/default/bug/create/created.html.tmpl @@ -19,6 +19,21 @@ # Contributor(s): Gervase Markham #%] +[%# INTERFACE: + # id: number; the ID of the bug that was created. + # sentmail: array of hash; bugs for which BugMail should be sent, contains: + # type: string; type of change for this bug, either 'created' if this bug + # was created or 'dep' if it was added as a dependent/blocker + # id: integer; the ID of the bug + # mailrecipients: hash; contains the BugMail recipients, for details on + # this contents, see template bug/process/bugmail.html.tmpl + # + # bug: object; Bugzilla::Bug object of the bug that was created (used in + # template bug/edit.html.tmpl + # bug_list: array of integers; storted bug list (used in template + # bug/navigate.html.tmpl) + #%] + [% PROCESS global/variables.none.tmpl %] [% PROCESS global/header.html.tmpl @@ -32,6 +47,7 @@ type = item.type id = item.id mail = item.mail + mailrecipients = item.mailrecipients %] [% END %]