[%# 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" %]

[% 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;
%]

::
:: [% target.identity %]
[% IF requestee.size %]
:: Requested of: [% summary.requestee %]
[% END %]
[% IF setter.size %]
:: Waiting on: [% summary.setter %]
[% END %]
::

[%+ PROCESS requests report="requestee" request_list=requestee %]

[%+ PROCESS requests report="setter" request_list=setter %]

[% END %]

::

Change who you are watching
  [%+ urlbase %]userprefs.cgi?tab=request_nagging

--
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 %]
