[%# 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. #%] [%# INTERFACE: # events: hash, keyed by event_id number. Values are anonymous hashes of: # schedule: array of hashes containing schedule info: # day: value in day column # time: value selected in time column # mailto_type: 0=user 1=group # mailto: recipient's id (profile or group) # queries: as with schedule, an anonymous array containing hashes of: # name: the named query's name # title: title to be displayed on the results # sort: integer that sets execution order on named queries #%] [% title = "Set up whining" %] [% PROCESS global/header.html.tmpl title = title style_urls = ['skins/standard/admin.css'] doc_section = "whining.html" %]

"Whining" is when [% terms.Bugzilla %] executes a saved search at a regular interval and sends the resulting list of [% terms.bugs %] via email.

To set up a new whine event, click "Add a new event." Enter a subject line for the message that will be sent, along with a block of text that will accompany the [% terms.bug %] list in the body of the message.

Schedules are added to an event by clicking on "Add a new schedule." A schedule consists of a day, a time of day or interval of times (e.g., every 15 minutes), and a target email address that may or may not be alterable, depending on your privileges. Events may have more than one schedule in order to run at multiple times or for different users.

Searches come from saved searches, which are created by executing a search, then telling [% terms.Bugzilla %] to remember the search under a particular name. Add a search by clicking "Add a search", and select the desired saved search name under "Search" and add a title for the [% terms.bug %] table. The optional number entered under "Sort" will determine the execution order (lowest to highest) if multiple queries are listed. If you check "One message per [% terms.bug %]," each [% terms.bug %] that matches the search will be sent in its own email message.

All times are server local time ([% local_timezone FILTER html %]).

[%# This hidden submit button must be here to set default behavior when the user presses return on a form input field #%] [% FOREACH event = events %] [% IF event.value.schedule.size == 0 %] [% ELSE %] [% END %] [% IF event.value.queries.size == 0 %] [% ELSE %] [% END %]
Event:
Email subject line:
Descriptive text sent within whine message: [% INCLUDE global/textarea.html.tmpl name = "event_${event.key}_body" minrows = 3 maxrows = 10 defaultrows = 5 cols = 80 defaultcontent = event.value.body %]
Send a message even if there are no [% terms.bugs %] in the search result:
Schedule: Not scheduled to run
Schedule: [% FOREACH schedule = event.value.schedule %] [% END %]
Interval [% IF mail_others %] Mail to [% END %]
[%# these hidden fields allow us to compare old values instead of reading the database to tell if a field has changed %] [% PROCESS day_field val=schedule.day %] [% PROCESS time_field val=schedule.time %] [% IF mail_others %] [% END %]
Searches: No searches
Searches: [% FOREACH query = event.value.queries %] [% END %]
Sort Search Title
[% PROCESS query_field thisquery=query.name %]
[% END %]

[% PROCESS global/footer.html.tmpl %] [% BLOCK query_field +%] [% IF available_queries.size > 0 %] [% ELSE %] Please visit the Search page and save a search [% END %] [%+ END %] [% BLOCK day_field +%] [%+ END %] [% BLOCK time_field +%] [%+ END %]