From 70b298ecbd3aba8f24bf6d0147bece13b81d6040 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 19 May 2015 20:46:40 +0800 Subject: Bug 1163868: Include requests from others in RequestNagger --- .../request_nagging-requestee-header.txt.tmpl | 19 ---- .../email/request_nagging-requestee.html.tmpl | 90 --------------- .../email/request_nagging-requestee.txt.tmpl | 47 -------- .../email/request_nagging-user-header.txt.tmpl | 25 +++++ .../default/email/request_nagging-user.html.tmpl | 115 ++++++++++++++++++++ .../en/default/email/request_nagging-user.txt.tmpl | 74 +++++++++++++ .../email/request_nagging-watching-header.txt.tmpl | 8 +- .../email/request_nagging-watching.html.tmpl | 121 ++++++++++++--------- .../email/request_nagging-watching.txt.tmpl | 61 +++++++---- 9 files changed, 330 insertions(+), 230 deletions(-) delete mode 100644 extensions/RequestNagger/template/en/default/email/request_nagging-requestee-header.txt.tmpl delete mode 100644 extensions/RequestNagger/template/en/default/email/request_nagging-requestee.html.tmpl delete mode 100644 extensions/RequestNagger/template/en/default/email/request_nagging-requestee.txt.tmpl create mode 100644 extensions/RequestNagger/template/en/default/email/request_nagging-user-header.txt.tmpl create mode 100644 extensions/RequestNagger/template/en/default/email/request_nagging-user.html.tmpl create mode 100644 extensions/RequestNagger/template/en/default/email/request_nagging-user.txt.tmpl (limited to 'extensions/RequestNagger/template') diff --git a/extensions/RequestNagger/template/en/default/email/request_nagging-requestee-header.txt.tmpl b/extensions/RequestNagger/template/en/default/email/request_nagging-requestee-header.txt.tmpl deleted file mode 100644 index 8ad9d6cb1..000000000 --- a/extensions/RequestNagger/template/en/default/email/request_nagging-requestee-header.txt.tmpl +++ /dev/null @@ -1,19 +0,0 @@ -[%# This Source Code Form is subject to the terms of the Mozilla Public - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - # - # This Source Code Form is "Incompatible With Secondary Licenses", as - # defined by the Mozilla Public License, v. 2.0. - #%] - -[% PROCESS "global/field-descs.none.tmpl" %] -[% PROCESS "global/reason-descs.none.tmpl" %] -From: [% Param('mailfrom') %] -To: [% recipient.email %] -Subject: [[% terms.Bugzilla %]] Your Overdue Requests - ([% FOREACH type = requests.item(recipient.email).typelist %] - [%- requests.item(recipient.email).types.item(type).size %] [%+ type %] - [% ", " UNLESS loop.last %] - [% END %]) -Date: [% date %] -X-Bugzilla-Type: nag diff --git a/extensions/RequestNagger/template/en/default/email/request_nagging-requestee.html.tmpl b/extensions/RequestNagger/template/en/default/email/request_nagging-requestee.html.tmpl deleted file mode 100644 index bdaaabb97..000000000 --- a/extensions/RequestNagger/template/en/default/email/request_nagging-requestee.html.tmpl +++ /dev/null @@ -1,90 +0,0 @@ -[%# This Source Code Form is subject to the terms of the Mozilla Public - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - # - # This Source Code Form is "Incompatible With Secondary Licenses", as - # defined by the Mozilla Public License, v. 2.0. - #%] - -[% PROCESS "global/field-descs.none.tmpl" %] - - - - - - [[% terms.Bugzilla %]] Your Overdue Requests - - - - -

- The following is a list of requests people have made of you, which are - currently overdue. To avoid disappointing others, please deal with them as - quickly as possible. -

- -[% requests = requests.item(recipient.login) %] -[% FOREACH type = requests.typelist %] - -

- [% type FILTER upper FILTER html %] requests - - (buglist) - -

- - - -[% END %] - -
-
- [% IF requests.types.item('review').size || requests.types.item('feedback').size %] - - Guidance on handling requests -
- [% END %] - - See all your overdue requests -
- - Opt out of these emails -
-
- -
-
- You are receiving this mail because: - -
-@@body-headers@@ - - diff --git a/extensions/RequestNagger/template/en/default/email/request_nagging-requestee.txt.tmpl b/extensions/RequestNagger/template/en/default/email/request_nagging-requestee.txt.tmpl deleted file mode 100644 index 4e3f67090..000000000 --- a/extensions/RequestNagger/template/en/default/email/request_nagging-requestee.txt.tmpl +++ /dev/null @@ -1,47 +0,0 @@ -[%# This Source Code Form is subject to the terms of the Mozilla Public - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - # - # This Source Code Form is "Incompatible With Secondary Licenses", as - # defined by the Mozilla Public License, v. 2.0. - #%] - -[% PROCESS "global/field-descs.none.tmpl" %] - -The following is a list of requests people have made of you, which are -currently overdue. To avoid disappointing others, please deal with them as -quickly as possible. - -[% requests = requests.item(recipient.login) %] -[% FOREACH type = requests.typelist %] -:: [% type FILTER upper FILTER html %] requests - -[% FOREACH request = requests.types.$type %] -[[% terms.Bug %] [%+ request.bug.id %]] [% request.bug.short_desc %] - [%+ request.flag.age %] from [% request.requester.identity %] - [%+ urlbase %]show_bug.cgi?id=[% request.bug.id +%] - [% IF request.attachment && request.attachment.ispatch %] - Review: [% urlbase %]review?bug=[% request.bug.id %]&attachment=[% request.attachment.id %] - [% END %] - Defer: [% urlbase %]request_defer?flag=[% request.flag.id %] - -[% END %] -[% END %] - -:: - -[% IF requests.types.item('review').size || requests.types.item('feedback').size %] -Guidance on handling requests: - https://wiki.mozilla.org/BMO/Handling_Requests -[% END %] - -See all your overdue requests: - [%+ urlbase %]request.cgi?action=queue&requestee=[% recipient.login FILTER uri %]&group=type - -Opt out of these emails: - [%+ urlbase %]userprefs.cgi#request_nagging - --- -You are receiving this mail because: you have overdue requests. - -@@body-headers@@ diff --git a/extensions/RequestNagger/template/en/default/email/request_nagging-user-header.txt.tmpl b/extensions/RequestNagger/template/en/default/email/request_nagging-user-header.txt.tmpl new file mode 100644 index 000000000..6bb9e997b --- /dev/null +++ b/extensions/RequestNagger/template/en/default/email/request_nagging-user-header.txt.tmpl @@ -0,0 +1,25 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[% + PROCESS "global/field-descs.none.tmpl"; + PROCESS "global/reason-descs.none.tmpl"; + summary = requests.item(recipient.login).summary; +%] + +From: [% Param('mailfrom') %] +To: [% recipient.email %] +Subject: [[% terms.Bugzilla %]] Overdue Requests + [% IF summary.requestee %] + (Of you: [% summary.requestee %]) + [% END %] + [% IF summary.setter %] + (By you: [% summary.setter %]) + [% END %] +Date: [% date %] +X-Bugzilla-Type: nag diff --git a/extensions/RequestNagger/template/en/default/email/request_nagging-user.html.tmpl b/extensions/RequestNagger/template/en/default/email/request_nagging-user.html.tmpl new file mode 100644 index 000000000..9aeb73f61 --- /dev/null +++ b/extensions/RequestNagger/template/en/default/email/request_nagging-user.html.tmpl @@ -0,0 +1,115 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[% + PROCESS "global/field-descs.none.tmpl"; + requestee = requests.item(recipient.login).requestee; + setter = requests.item(recipient.login).setter; + summary = requests.item(recipient.login).summary; + types = requests.item(recipient.login).types; +%] + + + + + + [[% terms.Bugzilla %]] Your Overdue Requests + + + + +[% IF requestee.size %] +

Overdue requests requiring action from you:

+
[% summary.requestee FILTER html %]
+ [% PROCESS requests report="requestee" requests=requestee %] +[% END %] + +[% IF requestee.size && setter.size %] +
+[% END %] + +[% IF setter.size %] +

Overdue requests you have requested:

+
[% summary.setter FILTER html %]
+ [% PROCESS requests report="setter" requests=setter %] +[% END %] + +[% BLOCK requests %] + [% FOREACH type IN types.item(report) %] +

+ [% type FILTER upper FILTER html %] requests + + (buglist) + +

+ + + [% END %] +[% END %] + +
+
+ [% IF requestee.item('review').size || requestee.item('feedback').size %] + + Guidance on handling requests +
+ [% END %] + + See all your overdue requests +
+ + Opt out of these emails +
+
+ +
+
+ You are receiving this mail because: + +
+@@body-headers@@ + + diff --git a/extensions/RequestNagger/template/en/default/email/request_nagging-user.txt.tmpl b/extensions/RequestNagger/template/en/default/email/request_nagging-user.txt.tmpl new file mode 100644 index 000000000..5138f5f00 --- /dev/null +++ b/extensions/RequestNagger/template/en/default/email/request_nagging-user.txt.tmpl @@ -0,0 +1,74 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[% + PROCESS "global/field-descs.none.tmpl"; + requestee = requests.item(recipient.login).requestee; + setter = requests.item(recipient.login).setter; + summary = requests.item(recipient.login).summary; + types = requests.item(recipient.login).types; +%] + +[% IF requestee.size %] +Overdue requests requiring action from you: +[%+ summary.requestee %] + +[%+ PROCESS requests report="requestee" request_list=requestee %] +[% END %] + +[% IF requestee.size && setter.size %] +- +[% END %] + +[% IF setter.size %] +Overdue requests you have requested: +[%+ summary.setter %] + +[%+ PROCESS requests report="setter" request_list=setter %] +[% END %] + +[% BLOCK requests %] +[% FOREACH type IN types.item(report) %] +:: [% type FILTER upper FILTER html %] requests + +[% FOREACH request IN request_list.item(type) %] +[[% terms.Bug %] [%+ request.bug.id %]] [% request.bug.short_desc %] + [% IF report == "requestee" %] + [%+ request.flag.age %] from [% request.setter.realname || request.setter.login %] + [% ELSE %] + [%+ request.flag.age %] to [% request.requestee.realname || request.requestee.login %] + [% END %] + [%+ urlbase %]show_bug.cgi?id=[% request.bug.id +%] + [% IF request.attachment && request.attachment.ispatch %] + Review: [% urlbase %]review?bug=[% request.bug.id %]&attachment=[% request.attachment.id %] + [% END %] + [% IF report == "requestee" %] + Defer: [% urlbase %]request_defer?flag=[% request.flag.id %] + [% END %] + +[% END %] +[% END %] +[% END %] + +:: + +[% IF requestee.item('review').size || requestee.item('feedback').size %] +Guidance on handling requests: + https://wiki.mozilla.org/BMO/Handling_Requests +[% END %] + +See all your overdue requests: + [%+ urlbase %]request.cgi?action=queue&requestee=[% recipient.login FILTER uri %]&group=type + +Opt out of these emails: + [%+ urlbase %]userprefs.cgi#request_nagging + +-- +You are receiving this mail because: you have overdue requests. + +@@body-headers@@ diff --git a/extensions/RequestNagger/template/en/default/email/request_nagging-watching-header.txt.tmpl b/extensions/RequestNagger/template/en/default/email/request_nagging-watching-header.txt.tmpl index 261e92f13..d825cb459 100644 --- a/extensions/RequestNagger/template/en/default/email/request_nagging-watching-header.txt.tmpl +++ b/extensions/RequestNagger/template/en/default/email/request_nagging-watching-header.txt.tmpl @@ -6,10 +6,12 @@ # defined by the Mozilla Public License, v. 2.0. #%] -[% PROCESS "global/field-descs.none.tmpl" %] -[% PROCESS "global/reason-descs.none.tmpl" %] +[% + PROCESS "global/field-descs.none.tmpl"; + PROCESS "global/reason-descs.none.tmpl"; +%] From: [% Param('mailfrom') %] To: [% recipient.email %] -Subject: [[% terms.Bugzilla %]] Overdue Requests Report +Subject: [[% terms.Bugzilla %]] Overdue Requests Date: [% date %] X-Bugzilla-Type: nag-watch diff --git a/extensions/RequestNagger/template/en/default/email/request_nagging-watching.html.tmpl b/extensions/RequestNagger/template/en/default/email/request_nagging-watching.html.tmpl index 91fb36e1d..14e4d7f4e 100644 --- a/extensions/RequestNagger/template/en/default/email/request_nagging-watching.html.tmpl +++ b/extensions/RequestNagger/template/en/default/email/request_nagging-watching.html.tmpl @@ -18,70 +18,55 @@

- The following is a list of people who you are watching that have overdue - requests. + The following is a list of people who you are watching that are involved in + overdue requests.

-
- [% FOREACH login = requests.keys.sort %] - [% requestee = requests.$login.requestee %] - [% requestee.identity FILTER html %] + [% + target = requests.item(login).target; + requestee = requests.item(login).requestee; + setter = requests.item(login).setter; + summary = requests.item(login).summary; + bug_ids = requests.item(login).bug_ids; + %] +

+ [% target.realname || target.login FILTER html %] +

[% END %] [% FOREACH login = requests.keys.sort %] - [% requestee = requests.$login.requestee %] - - [% bug_ids = [] %] - [% FOREACH type = requests.$login.typelist %] - [% FOREACH request = requests.$login.types.$type %] - [% bug_ids.push(request.bug.id) %] - [% END %] - [% END %] + [% + target = requests.item(login).target; + requestee = requests.item(login).requestee; + setter = requests.item(login).setter; + summary = requests.item(login).summary; + types = requests.item(login).types; + %]
+

- [% requestee.identity FILTER html %] - - (buglist) -
- - [% FOREACH type = requests.$login.typelist %] - [% requests.$login.types.item(type).size %] [%+ type FILTER html %] - [% ", " UNLESS loop.last %] - [% END %] - + [% target.realname || target.login FILTER html %]

- [% FOREACH type = requests.$login.typelist %] - -

[% type FILTER upper FILTER html %] requests

- - - - [% END %] + [% PROCESS requests report="requestee" request_list=requestee %] + [% PROCESS requests report="setter" request_list=setter %] [% END %] @@ -102,3 +87,39 @@ @@body-headers@@ + +[% BLOCK requests %] + [% RETURN UNLESS request_list.size %] + [% FOREACH type IN types.item(report) %] + +

+ [% type FILTER upper FILTER html %] + [%= report == "requestee" ? "requested of" : "waiting on" FILTER none %] +

+ + + + [% END %] + +[% END %] diff --git a/extensions/RequestNagger/template/en/default/email/request_nagging-watching.txt.tmpl b/extensions/RequestNagger/template/en/default/email/request_nagging-watching.txt.tmpl index 8bc5a3b7c..0e80cc73c 100644 --- a/extensions/RequestNagger/template/en/default/email/request_nagging-watching.txt.tmpl +++ b/extensions/RequestNagger/template/en/default/email/request_nagging-watching.txt.tmpl @@ -8,32 +8,28 @@ [% PROCESS "global/field-descs.none.tmpl" %] -The following is a list of people who you are watching that have overdue -requests. +[% FOREACH login IN requests.keys.sort %] +[% + target = requests.item(login).target; + requestee = requests.item(login).requestee; + setter = requests.item(login).setter; + summary = requests.item(login).summary; + types = requests.item(login).types; +%] -[% FOREACH login = requests.keys.sort %] -[% requestee = requests.$login.requestee %] :: -:: [% requestee.identity %] -:: [% FOREACH type = requests.$login.typelist %] - [%- requests.$login.types.item(type).size %] [%+ type %] - [% ", " UNLESS loop.last %] - [% END %] +:: [% target.identity %] +[% IF requestee.size %] +:: Requested of: [% summary.requestee %] +[% END %] +[% IF setter.size %] +:: Waiting on: [% summary.setter %] +[% END %] :: -[% FOREACH type = requests.$login.typelist %] -:: [% type FILTER upper FILTER html %] requests +[%+ PROCESS requests report="requestee" request_list=requestee %] -[% FOREACH request = requests.$login.types.$type %] -[[% terms.Bug %] [%+ request.bug.id %]] [% request.bug.short_desc %] - [%+ request.flag.age %] from [% request.requester.identity %] - [%+ urlbase %]show_bug.cgi?id=[% request.bug.id +%] - [% IF request.flag.deferred %] - Deferred until [%+ request.flag.deferred.ymd %] - [% END %] - -[% END %] -[% END %] +[%+ PROCESS requests report="setter" request_list=setter %] [% END %] @@ -47,3 +43,26 @@ You are receiving this mail because: you are watching someone with overdue requests. @@body-headers@@ + +[% BLOCK requests %] +[% RETURN UNLESS request_list.size %] + +[% FOREACH type IN types.item(report) %] +:: [% type FILTER upper %] [%= report == "requestee" ? "requested of" : "waiting on" %] + +[% FOREACH request IN request_list.item(type) %] +[[% terms.Bug %] [%+ request.bug.id %]] [% request.bug.short_desc %] + [% IF report == "requestee" %] + [%+ request.flag.age %] from [% request.setter.realname || request.setter.login %] + [% ELSE %] + [%+ request.flag.age %] to [% request.requestee.realname || request.requestee.login %] + [% END %] + [%+ urlbase %]show_bug.cgi?id=[% request.bug.id +%] + [% IF request.flag.deferred %] + Deferred until [%+ request.flag.deferred.ymd %] + [% END %] + +[% END %] +[% END %] + +[% END %] -- cgit v1.2.3-24-g4f1b