From 6fbae131d57590e48e5a5ad0b9362767ce3bdf9f Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Tue, 30 Jul 2013 13:22:06 -0400 Subject: Bug 899627 - backport upstream bug 856736 to bmo/4.2 for filtering on dependency bugmail --- Bugzilla/BugMail.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Bugzilla/BugMail.pm') diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index 6e7fc7b80..3d3bd2dbf 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -332,6 +332,7 @@ sub Send { diffs => \@diffs, rels_which_want => \%rels_which_want, referenced_bugs => $referenced_bugs, + dep_only => $params->{dep_only} }); push(@sent, $user->login) if $sent_mail; } @@ -352,7 +353,7 @@ sub Send { sub sendMail { my $params = shift; - + my $user = $params->{to}; my $bug = $params->{bug}; my @send_comments = @{ $params->{comments} }; @@ -362,6 +363,7 @@ sub sendMail { my @diffs = @{ $params->{diffs} }; my $relRef = $params->{rels_which_want}; my $referenced_bugs = $params->{referenced_bugs}; + my $dep_only = $params->{dep_only}; # Only display changes the user is allowed see. my @display_diffs; @@ -411,6 +413,10 @@ sub sendMail { push(@changedfieldnames, 'attachment.created'); } + my $bugmailtype = "changed"; + $bugmailtype = "new" if !$bug->lastdiffed; + $bugmailtype = "dep_changed" if $dep_only; + my $vars = { date => $date, to_user => $user, @@ -426,6 +432,7 @@ sub sendMail { new_comments => \@send_comments, threadingmarker => build_thread_marker($bug->id, $user->id, !$bug->lastdiffed), referenced_bugs => $referenced_bugs, + bugmailtype => $bugmailtype }; my $msg = _generate_bugmail($user, $vars); MessageToMTA($msg); -- cgit v1.2.3-24-g4f1b