From a562e19066d879366e60e6c4238fef422a961140 Mon Sep 17 00:00:00 2001 From: vfilippov Date: Thu, 27 Aug 2009 10:45:41 +0000 Subject: [PATCH] Bug 40933 Field table for new bugs git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@311 6955db30-a419-402b-8a0d-67ecbb4d7f56 --- Bugzilla/BugMail.pm | 5 ++++- template/en/default/email/newchangedmail.txt.tmpl | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index 8610c1ccb..720d6a937 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -622,6 +622,7 @@ sub sendMail } my $diffs = $difftext; + my @showfieldvalues = (); # for HTML emails if ($isnew) { my $head = ""; foreach my $f (@headerlist) { @@ -630,10 +631,11 @@ sub sendMail # If there isn't anything to show, don't include this header. next unless $value; # Only send estimated_time if it is enabled and the user is in the group. - if (($f ne 'estimated_time' && $f ne 'deadline') || $user->is_timetracker) { + if (($f ne 'work_time' && $f ne 'estimated_time' && $f ne 'deadline') || $user->is_timetracker) { my $desc = $fielddescription{$f}; $head .= multiline_sprintf(FORMAT_DOUBLE, ["$desc:", $value], FORMAT_2_SIZE); + push @showfieldvalues, { desc => $desc, value => $value }; } } $diffs = $head . ($difftext ? "\n\n" : "") . $diffs; @@ -653,6 +655,7 @@ sub sendMail my $vars = { isnew => $isnew, + showfieldvalues => \@showfieldvalues, to => $user->email, bugid => $id, alias => Bugzilla->params->{'usebugaliases'} ? $values{'alias'} : "", diff --git a/template/en/default/email/newchangedmail.txt.tmpl b/template/en/default/email/newchangedmail.txt.tmpl index ef39f6576..e46294661 100644 --- a/template/en/default/email/newchangedmail.txt.tmpl +++ b/template/en/default/email/newchangedmail.txt.tmpl @@ -108,12 +108,21 @@ body { font-size: 10pt; } .difft { font-size: 10pt; border-width: 0 0 1px 0; border-style: solid; border-color: #808080 } .difft td { border-width: 0 0 1px 0; border-style: solid; border-color: #808080 } .difft tr.n td { border-width: 0; } +.difft.fv th { text-align: left; } /*-->*/

Bug [% bugid %] (prod:[% product %].[% comp %], pri:[% priority %], sev:[% severity %], miles:[% targetmilestone %])

+[% IF isnew AND showfieldvalues.size > 0 %] + +[% FOR f = showfieldvalues %] + +[% END %] +
[% f.desc FILTER html %]:[% f.value FILTER html %]
+[% END %] + [% IF diffarray AND diffarray.size > 0 %] [% FOR adiff = diffarray %]