From b1655e76f9019edbbe43772568197fc587139077 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sat, 23 Sep 2006 06:00:32 +0000 Subject: [PATCH] =?utf8?q?Bug=20349852:=20"I'm=20added=20to=20or=20removed?= =?utf8?q?=20from=20this=20capacity"=20email=20pref=20doesn't=20work=20for?= =?utf8?q?=20new=20bugs=20-=20Original=20patch=20by=20Olav=20Vitters=20,=20slightly=20modified=20by=20Fr?= =?utf8?q?=C3=A9d=C3=A9ric=20Buclin=20=20r=3DLpSolit,?= =?utf8?q?=20r=3Dmkanat=20a=3Djustdave?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Bugzilla/BugMail.pm | 3 ++- Bugzilla/User.pm | 12 +++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index a9a1a3c30d..3fd821be60 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -426,7 +426,8 @@ sub ProcessOneBug { $relationship, $diffs, $newcomments, - $changer)) + $changer, + !$start)) { push(@rels_which_want, $relationship); } diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index c34239b0ff..ca882f3fc3 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -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; } -- 2.47.2