]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 289382: Incorrect dependency bugmail recipients on bug creation - Patch by Teemu...
authorlpsolit%gmail.com <>
Thu, 30 Jun 2005 07:03:20 +0000 (07:03 +0000)
committerlpsolit%gmail.com <>
Thu, 30 Jun 2005 07:03:20 +0000 (07:03 +0000)
post_bug.cgi
template/en/default/bug/create/created.html.tmpl

index 514e57a31186053b9e6e255e5b17453db0e8c2ae..66d5cd7422fe8912824124b0854d30b014c44d51 100755 (executable)
@@ -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;
index 312d7f70bc9e18427ad90e11c7336b1c85f6d002..c55c1fd4757e004a0df689f88d96e759a301eb6f 100644 (file)
   # Contributor(s): Gervase Markham <gerv@gerv.net>
   #%]
 
+[%# 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 %]