summaryrefslogtreecommitdiffstats
path: root/template/en/default/request
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-08-05 14:35:50 +0200
committerlpsolit%gmail.com <>2009-08-05 14:35:50 +0200
commitd0002e9626b97df6fad2c597b89c8ec31f7c308a (patch)
treeb14fd7ecb63ad9931b5c72e9c666ef499f0daa1d /template/en/default/request
parent8b2db148f30d74283d3a80ebd77691c94a1ca4a7 (diff)
downloadbugzilla-d0002e9626b97df6fad2c597b89c8ec31f7c308a.tar.gz
bugzilla-d0002e9626b97df6fad2c597b89c8ec31f7c308a.tar.xz
Bug 415541: Implement $bug->set_flags() and $attachment->set_flags() - Patch by Frédéric Buclin <LpSolit@gmail.com> a=LpSolit
Diffstat (limited to 'template/en/default/request')
-rw-r--r--template/en/default/request/email.txt.tmpl19
1 files changed, 11 insertions, 8 deletions
diff --git a/template/en/default/request/email.txt.tmpl b/template/en/default/request/email.txt.tmpl
index 81948c42c..adc0faa1c 100644
--- a/template/en/default/request/email.txt.tmpl
+++ b/template/en/default/request/email.txt.tmpl
@@ -24,28 +24,31 @@
[% bugidsummary = bug.bug_id _ ': ' _ bug.short_desc %]
[% attidsummary = attachment.id _ ': ' _ attachment.description %]
+[% flagtype_name = flag ? flag.type.name : old_flag.type.name %]
[% statuses = { '+' => "granted" , '-' => 'denied' , 'X' => "canceled" ,
'?' => "asked" } %]
[% to_identity = "" %]
[% on_behalf_of = 0 %]
-[% IF flag.status == '?' %]
+[% action = flag.status || 'X' %]
+
+[% IF flag && flag.status == '?' %]
[% subject_status = "requested" %]
- [% IF flag.setter.id == user.id %]
+ [% IF flag.setter_id == user.id %]
[% to_identity = flag.requestee.identity _ " for" %]
[% ELSE %]
[% on_behalf_of = 1 %]
[% IF flag.requestee %][% to_identity = " to " _ flag.requestee.identity %][% END %]
[% END %]
[% ELSE %]
- [% IF flag.requester %]
- [% to_identity = flag.requester.identity _ "'s request for" %]
+ [% IF old_flag && old_flag.status == '?' %]
+ [% to_identity = old_flag.setter.identity _ "'s request for" %]
[% END %]
- [% subject_status = statuses.${flag.status} %]
+ [% subject_status = statuses.$action %]
[% END %]
From: [% Param('mailfrom') %]
To: [% to %]
-Subject: [% flag.type.name %] [%+ subject_status %]: [[% terms.Bug %] [%+ bug.bug_id %]] [% bug.short_desc %]
+Subject: [% flagtype_name %] [%+ subject_status %]: [[% terms.Bug %] [%+ bug.bug_id %]] [% bug.short_desc %]
[%- IF attachment %] :
[Attachment [% attachment.id %]] [% attachment.description %][% END %]
X-Bugzilla-Type: request
@@ -55,10 +58,10 @@ X-Bugzilla-Type: request
[%- FILTER bullet = wrap(80) -%]
[% IF on_behalf_of %]
-[% user.identity %] has reassigned [% flag.setter.identity %]'s request for [% flag.type.name %]
+[% user.identity %] has reassigned [% flag.setter.identity %]'s request for [% flagtype_name %]
[% to_identity %]:
[% ELSE %]
-[% user.identity %] has [% statuses.${flag.status} %] [%+ to_identity %] [%+ flag.type.name %]:
+[% user.identity %] has [% statuses.$action %] [%+ to_identity %] [%+ flagtype_name %]:
[% END %]
[% terms.Bug %] [%+ bugidsummary %]