Commit ec73732e authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 365735: Add classification, alias, assigned to name, reporter login and…

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
parent 4d917335
...@@ -37,6 +37,7 @@ use Bugzilla::User; ...@@ -37,6 +37,7 @@ use Bugzilla::User;
use Bugzilla::Constants; use Bugzilla::Constants;
use Bugzilla::Util; use Bugzilla::Util;
use Bugzilla::Bug; use Bugzilla::Bug;
use Bugzilla::Classification;
use Bugzilla::Product; use Bugzilla::Product;
use Bugzilla::Component; use Bugzilla::Component;
use Bugzilla::Mailer; use Bugzilla::Mailer;
...@@ -117,6 +118,7 @@ sub Send { ...@@ -117,6 +118,7 @@ sub Send {
my $product = new Bugzilla::Product($values{product_id}); my $product = new Bugzilla::Product($values{product_id});
$values{product} = $product->name; $values{product} = $product->name;
$values{classification} = Bugzilla::Classification->new($product->classification_id)->name;
my $component = new Bugzilla::Component($values{component_id}); my $component = new Bugzilla::Component($values{component_id});
$values{component} = $component->name; $values{component} = $component->name;
...@@ -636,6 +638,8 @@ sub sendMail { ...@@ -636,6 +638,8 @@ sub sendMail {
neworchanged => $isnew ? 'New: ' : '', neworchanged => $isnew ? 'New: ' : '',
to => $user->email, to => $user->email,
bugid => $id, bugid => $id,
alias => Bugzilla->params->{'usebugaliases'} ? $values{'alias'} : "",
classification => $values{'classification'},
product => $values{'product'}, product => $values{'product'},
comp => $values{'component'}, comp => $values{'component'},
keywords => $values{'keywords'}, keywords => $values{'keywords'},
...@@ -643,6 +647,7 @@ sub sendMail { ...@@ -643,6 +647,7 @@ sub sendMail {
status => $values{'bug_status'}, status => $values{'bug_status'},
priority => $values{'priority'}, priority => $values{'priority'},
assignedto => $values{'assigned_to'}, assignedto => $values{'assigned_to'},
assignedtoname => Bugzilla::User->new({name => $values{'assigned_to'}})->name,
targetmilestone => $values{'target_milestone'}, targetmilestone => $values{'target_milestone'},
changedfields => $values{'changed_fields'}, changedfields => $values{'changed_fields'},
summary => $values{'short_desc'}, summary => $values{'short_desc'},
...@@ -652,6 +657,8 @@ sub sendMail { ...@@ -652,6 +657,8 @@ sub sendMail {
reasonswatchheader => join(" ", @watchingrel), reasonswatchheader => join(" ", @watchingrel),
changer => $values{'changer'}, changer => $values{'changer'},
changername => $values{'changername'}, changername => $values{'changername'},
reporter => $values{'reporter'},
reportername => Bugzilla::User->new({name => $values{'reporter'}})->name,
diffs => $diffs, diffs => $diffs,
threadingmarker => $threadingmarker threadingmarker => $threadingmarker
}; };
......
...@@ -25,6 +25,9 @@ Subject: [[% terms.Bug %] [%+ bugid %]] [% neworchanged %][%+ summary %] ...@@ -25,6 +25,9 @@ Subject: [[% terms.Bug %] [%+ bugid %]] [% neworchanged %][%+ summary %]
X-Bugzilla-Reason: [% reasonsheader %] X-Bugzilla-Reason: [% reasonsheader %]
X-Bugzilla-Type: newchanged X-Bugzilla-Type: newchanged
X-Bugzilla-Watch-Reason: [% reasonswatchheader %] X-Bugzilla-Watch-Reason: [% reasonswatchheader %]
[% IF Param('useclassification') %]
X-Bugzilla-Classification: [% classification %]
[% END %]
X-Bugzilla-Product: [% product %] X-Bugzilla-Product: [% product %]
X-Bugzilla-Component: [% comp %] X-Bugzilla-Component: [% comp %]
X-Bugzilla-Keywords: [% keywords %] X-Bugzilla-Keywords: [% keywords %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment