Toggle sending Announcer emails upon ticket changes
This plugin provides a link (in the contextual navigation menu) to toggle on and off sending emails for your ticket changes. The purpose is to reduce superfluous emails for ticket changes that the author deems low-value.
/report pages since ticket changes are possible on all of these, eg via BatchModify or GridModify.
If you have any issues, create a new ticket.
Download the zipped source from here.
- Install the plugin after downloading and unzipping:
See TracPlugins for more installation details and options.
cd quietplugin/0.12 sudo python setup.py install
- Restart Trac's web server.
- Enable the plugin and disable
[components] announcer.* = enabled announcer.distributors.mail.EmailDistributor = disabled quiet.* = enabled
Alternatively, you can use the Trac Web Admin GUI. The
trac.ini lines above ensure that the plugin uses its own email distributor. This distributor effectively wraps the announcer's EmailDistributor with an extra check to see if the user entered quiet mode or not.
There are the following optional steps for configuration:
- Customize the quiet mode labels in
[quiet] enter_label = Enter Quiet Mode leave_label = Leave Quiet Mode
- Add the
QUIET_MODEpermission to users or groups as appropriate on the Admin > Permissions page.
The following are typical scenarios of how this plugin could be used:
- During planning, I can now avoid barraging people with emails when I move large batches of tickets from one milestone to another using BatchModify.
- I want to make a minor fix to a ticket's description that doesn't call for yet another email to be sent - enter quiet mode!
- I'm triaging many tickets in a Queue report with new positions using GridModify and I don't want an email sent for each change.
- I'm managing dependencies using the Analyze plugin and don't want to inundate the team with emails of its fixes.
Trigger quiet mode
To help you remember to enter quiet mode for the above use cases or similar ones, you can create trigger rules on DOM elements that will prompt you to enter or leave quiet mode (if you're not already in that state):
[quiet] 1.selector = #analyzebutton 1.action = enter 2.selector = #batchmod_submit 2.action = enter 2.submit = true 3.selector = #propertyform[action*=ticket] .buttons input[name=submit] 3.action = leave 3.only_if = #comment:first=.+ 3.submit = true
The above example defines three trigger rules:
- When the "Analyze.." button is clicked, prompt to enter quiet mode.
- When the "Batch Modify" button is clicked, prompt to enter quiet mode (and prevent the submission - but then they can submit again).
- When a ticket's "Submit changes" button is clicked and there's some text in the comment field, then prompt to enter quiet mode (and prevent the submission - but then they can submit again).
only_if option can either be just a CSS selector or also include an expected regex value (eg the
- If it is a CSS selector, then the selector must exist.
- If it is an expected regex value, then the selected item's jQuery
val()must match the expected value.
- 15123 by rjollos on 2015-12-14 20:51:29
This attribute isn't supported in setuptools >= 10.
Bump version to 1.0.2.
- 14035 by rjollos on 2014-07-25 13:41:31
1.0.1: Fix URL in
- 14029 by rjollos on 2014-07-25 13:32:17
1.0.1: Change license to 3-Clause BSD with permission of author