summaryrefslogtreecommitdiffstats
path: root/Bugzilla/BugMail.pm
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-07-30 19:22:06 +0200
committerDave Lawrence <dlawrence@mozilla.com>2013-07-30 19:22:06 +0200
commit6fbae131d57590e48e5a5ad0b9362767ce3bdf9f (patch)
treec68317f2111b1de15f89f06be8b78dfaba523dcb /Bugzilla/BugMail.pm
parent249517dcd0d8e2fe584d85abd91ede580e2c9d0d (diff)
downloadbugzilla-6fbae131d57590e48e5a5ad0b9362767ce3bdf9f.tar.gz
bugzilla-6fbae131d57590e48e5a5ad0b9362767ce3bdf9f.tar.xz
Bug 899627 - backport upstream bug 856736 to bmo/4.2 for filtering on dependency bugmail
Diffstat (limited to 'Bugzilla/BugMail.pm')
-rw-r--r--Bugzilla/BugMail.pm9
1 files changed, 8 insertions, 1 deletions
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);