summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-08-23 18:51:43 +0200
committerDave Lawrence <dlawrence@mozilla.com>2012-08-23 18:51:43 +0200
commit59fc67aa8f4a4a00037d01107da07da5e82c8127 (patch)
tree48afd60cf6f549d52fb4e0615021d533301909bf /Bugzilla
parent091283e1a85161f78ec9b36564ff47dc5e89b854 (diff)
downloadbugzilla-59fc67aa8f4a4a00037d01107da07da5e82c8127.tar.gz
bugzilla-59fc67aa8f4a4a00037d01107da07da5e82c8127.tar.xz
Bug 785063 - content of x-bugzilla-changed-fields in bugmail has changed from field descriptions to field names
r=glob
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/BugMail.pm11
1 files changed, 8 insertions, 3 deletions
diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm
index 31a0a1af2..069ebbe60 100644
--- a/Bugzilla/BugMail.pm
+++ b/Bugzilla/BugMail.pm
@@ -401,12 +401,15 @@ sub sendMail {
push(@watchingrel, 'None') unless @watchingrel;
push @watchingrel, map { user_id_to_login($_) } @$watchingRef;
- my @changedfields = uniq map { $_->{field_name} } @display_diffs;
+ # BMO: Use field descriptions instead of field names in header
+ my @changedfields = uniq map { $_->{field_desc} } @display_diffs;
+ my @changedfieldnames = uniq map { $_->{field_name} } @display_diffs;
# Add attachments.created to changedfields if one or more
# comments contain information about a new attachment
if (grep($_->type == CMT_ATTACHMENT_CREATED, @send_comments)) {
- push(@changedfields, 'attachments.created');
+ push(@changedfields, 'Attachment Created');
+ push(@changedfieldnames, 'attachment.created');
}
my $vars = {
@@ -419,7 +422,8 @@ sub sendMail {
reasonswatchheader => join(" ", @watchingrel),
changer => $changer,
diffs => \@display_diffs,
- changedfields => \@changedfields,
+ changedfields => \@changedfields,
+ changedfieldnames => \@changedfieldnames,
new_comments => \@send_comments,
threadingmarker => build_thread_marker($bug->id, $user->id, !$bug->lastdiffed),
referenced_bugs => $referenced_bugs,
@@ -484,6 +488,7 @@ sub _get_diffs {
my $diffs = $dbh->selectall_arrayref(
"SELECT fielddefs.name AS field_name,
+ fielddefs.description AS field_desc,
bugs_activity.bug_when, bugs_activity.removed AS old,
bugs_activity.added AS new, bugs_activity.attach_id,
bugs_activity.comment_id, bugs_activity.who