[%# -*- mode: html -*- %] [%# The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): Erik Stambaugh #%] [%# 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 #%] [% PROCESS global/variables.none.tmpl %] [% title = "Set up whining" %] [% PROCESS global/header.html.tmpl title = title doc_section = "whining.html" %]

"Whining" is when [% terms.Bugzilla %] executes a saved query 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 query by clicking "Add a new query", 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 %]
Schedule: Not scheduled to run
Schedule: [% IF mail_others %] [% END %] [% FOREACH schedule = event.value.schedule %] [% END %]
Interval Mail to
[%# 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 %] One message per [% terms.bug %]
[% END %]

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