summaryrefslogtreecommitdiffstats
path: root/Bugzilla/BugMail.pm
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-01-25 20:47:08 +0100
committerDave Lawrence <dlawrence@mozilla.com>2012-01-25 20:47:08 +0100
commit2fdfa60f167cbbee507351fba19c8e01880d9ae6 (patch)
tree216a80642b669c42393fcbdb0bb9575c5cfbbdd9 /Bugzilla/BugMail.pm
parentca52dda997705bc31f077a250e49d5761f381898 (diff)
downloadbugzilla-2fdfa60f167cbbee507351fba19c8e01880d9ae6.tar.gz
bugzilla-2fdfa60f167cbbee507351fba19c8e01880d9ae6.tar.xz
Bug 719526 - Add an extra mail header to messages containing a link to a first patch
r=glob
Diffstat (limited to 'Bugzilla/BugMail.pm')
-rw-r--r--Bugzilla/BugMail.pm12
1 files changed, 10 insertions, 2 deletions
diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm
index 60ff45e38..efbba5215 100644
--- a/Bugzilla/BugMail.pm
+++ b/Bugzilla/BugMail.pm
@@ -130,7 +130,7 @@ sub Send {
my $comments = $bug->comments({ after => $start, to => $end });
# Skip empty comments.
@$comments = grep { $_->type || $_->body =~ /\S/ } @$comments;
-
+
###########################################################################
# Start of email filtering code
###########################################################################
@@ -361,6 +361,14 @@ sub sendMail {
push(@watchingrel, 'None') unless @watchingrel;
push @watchingrel, map { user_id_to_login($_) } @$watchingRef;
+ my @changedfields = uniq map { $_->{field_name} } @display_diffs;
+
+ # Add Attachment Created to changedfields if one or more
+ # comments contain information about a new attachment
+ if (grep($_->type == CMT_ATTACHMENT_CREATED, @send_comments)) {
+ push(@changedfields, 'Attachment Created');
+ }
+
my $vars = {
date => $date,
to_user => $user,
@@ -371,7 +379,7 @@ sub sendMail {
reasonswatchheader => join(" ", @watchingrel),
changer => $changer,
diffs => \@display_diffs,
- changedfields => [uniq map { $_->{field_name} } @display_diffs],
+ changedfields => \@changedfields,
new_comments => \@send_comments,
threadingmarker => build_thread_marker($bug->id, $user->id, !$bug->lastdiffed),
};