diff options
author | lpsolit%gmail.com <> | 2006-09-23 07:58:53 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2006-09-23 07:58:53 +0200 |
commit | 4c0d90b0e04bc1957d781709a12adfc93758175a (patch) | |
tree | b17863ccdd4fff7cf4063812c3f6ba35b32eea65 /Bugzilla | |
parent | 6c0f16ffbf7b39da24ded73e17fd2fc0ea4e1a75 (diff) | |
download | bugzilla-4c0d90b0e04bc1957d781709a12adfc93758175a.tar.gz bugzilla-4c0d90b0e04bc1957d781709a12adfc93758175a.tar.xz |
Bug 349852: "I'm added to or removed from this capacity" email pref doesn't work for new bugs - Original patch by Olav Vitters <bugzilla-mozilla@bkor.dhs.org>, slightly modified by Frédéric Buclin <LpSolit@gmail.com> r=LpSolit, r=mkanat a=justdave
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/BugMail.pm | 3 | ||||
-rw-r--r-- | Bugzilla/User.pm | 12 |
2 files changed, 13 insertions, 2 deletions
diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index bae1b2777..e78be86ec 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -418,7 +418,8 @@ sub ProcessOneBug { $relationship, $diffs, $newcomments, - $changer)) + $changer, + !$start)) { $rels_which_want{$relationship} = $recipients{$user_id}->{$relationship}; diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 961b2ca0b..09fd2f9ce 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -1183,7 +1183,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: @@ -1228,6 +1228,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; } |