summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2007-08-26 18:28:00 +0200
committerlpsolit%gmail.com <>2007-08-26 18:28:00 +0200
commitec73732ec6e7c75b16689e67e7c4bf7a301688f7 (patch)
tree419d110368b81a3baf19ec21d843dfcb40755eb4
parent4d9173355494d25365ad65667d1bc27905b381ff (diff)
downloadbugzilla-ec73732ec6e7c75b16689e67e7c4bf7a301688f7.tar.gz
bugzilla-ec73732ec6e7c75b16689e67e7c4bf7a301688f7.tar.xz
Bug 365735: Add classification, alias, assigned to name, reporter login and reporter name fields to BugMail - Patch by Albert Ting <altlist@gmail.com> r=wicked a=mkanat
-rw-r--r--Bugzilla/BugMail.pm7
-rw-r--r--template/en/default/email/newchangedmail.txt.tmpl3
2 files changed, 10 insertions, 0 deletions
diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm
index c9f09c551..539a481ed 100644
--- a/Bugzilla/BugMail.pm
+++ b/Bugzilla/BugMail.pm
@@ -37,6 +37,7 @@ use Bugzilla::User;
use Bugzilla::Constants;
use Bugzilla::Util;
use Bugzilla::Bug;
+use Bugzilla::Classification;
use Bugzilla::Product;
use Bugzilla::Component;
use Bugzilla::Mailer;
@@ -117,6 +118,7 @@ sub Send {
my $product = new Bugzilla::Product($values{product_id});
$values{product} = $product->name;
+ $values{classification} = Bugzilla::Classification->new($product->classification_id)->name;
my $component = new Bugzilla::Component($values{component_id});
$values{component} = $component->name;
@@ -636,6 +638,8 @@ sub sendMail {
neworchanged => $isnew ? 'New: ' : '',
to => $user->email,
bugid => $id,
+ alias => Bugzilla->params->{'usebugaliases'} ? $values{'alias'} : "",
+ classification => $values{'classification'},
product => $values{'product'},
comp => $values{'component'},
keywords => $values{'keywords'},
@@ -643,6 +647,7 @@ sub sendMail {
status => $values{'bug_status'},
priority => $values{'priority'},
assignedto => $values{'assigned_to'},
+ assignedtoname => Bugzilla::User->new({name => $values{'assigned_to'}})->name,
targetmilestone => $values{'target_milestone'},
changedfields => $values{'changed_fields'},
summary => $values{'short_desc'},
@@ -652,6 +657,8 @@ sub sendMail {
reasonswatchheader => join(" ", @watchingrel),
changer => $values{'changer'},
changername => $values{'changername'},
+ reporter => $values{'reporter'},
+ reportername => Bugzilla::User->new({name => $values{'reporter'}})->name,
diffs => $diffs,
threadingmarker => $threadingmarker
};
diff --git a/template/en/default/email/newchangedmail.txt.tmpl b/template/en/default/email/newchangedmail.txt.tmpl
index fa7317613..93d002d2a 100644
--- a/template/en/default/email/newchangedmail.txt.tmpl
+++ b/template/en/default/email/newchangedmail.txt.tmpl
@@ -25,6 +25,9 @@ Subject: [[% terms.Bug %] [%+ bugid %]] [% neworchanged %][%+ summary %]
X-Bugzilla-Reason: [% reasonsheader %]
X-Bugzilla-Type: newchanged
X-Bugzilla-Watch-Reason: [% reasonswatchheader %]
+[% IF Param('useclassification') %]
+X-Bugzilla-Classification: [% classification %]
+[% END %]
X-Bugzilla-Product: [% product %]
X-Bugzilla-Component: [% comp %]
X-Bugzilla-Keywords: [% keywords %]