]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 349852: "I'm added to or removed from this capacity" email pref doesn't work...
authorlpsolit%gmail.com <>
Sat, 23 Sep 2006 06:00:32 +0000 (06:00 +0000)
committerlpsolit%gmail.com <>
Sat, 23 Sep 2006 06:00:32 +0000 (06:00 +0000)
Bugzilla/BugMail.pm
Bugzilla/User.pm

index a9a1a3c30da28f1227c4d30396232438d29e618c..3fd821be603d7cc0558b16c6477b8e3abeb27d3b 100644 (file)
@@ -426,7 +426,8 @@ sub ProcessOneBug {
                                           $relationship, 
                                           $diffs, 
                                           $newcomments, 
-                                          $changer))
+                                          $changer,
+                                          !$start))
                 {
                     push(@rels_which_want, $relationship);
                 }
index c34239b0ff2a7835803b5d5c192f594b1d2a4db8..ca882f3fc3d7705f2211991feab15dc277311287 100644 (file)
@@ -1126,7 +1126,7 @@ our %names_to_events = (
 # Note: the "+" signs before the constants suppress bareword quoting.
 sub wants_bug_mail {
     my $self = shift;
-    my ($bug_id, $relationship, $fieldDiffs, $commentField, $changer) = @_;
+    my ($bug_id, $relationship, $fieldDiffs, $commentField, $changer, $bug_is_new) = @_;
 
     # Don't send any mail, ever, if account is disabled 
     # XXX Temporary Compatibility Change 1 of 2:
@@ -1171,6 +1171,16 @@ sub wants_bug_mail {
         }
     }
 
+    # You role is new if the bug itself is.
+    # Only makes sense for the assignee, QA contact and the CC list.
+    if ($bug_is_new
+        && ($relationship == REL_ASSIGNEE
+            || $relationship == REL_QA
+            || $relationship == REL_CC))
+    {
+        $events{+EVT_ADDED_REMOVED} = 1;
+    }
+
     if ($commentField =~ /Created an attachment \(/) {
         $events{+EVT_ATTACHMENT} = 1;
     }