wiki:TicketModerator

Trac Ticket Moderator Plugin

Description

The TicketModerator plugin is an extension for the  Trac project management and bug/issue tracking system. It supports the human moderation of new tickets and ticket comments for unprivileged users within Trac. When an unprivileged user submits a ticket or ticket comment, their submission is recorded in a "moderation queue" and is not visible on the main Trac site until a Moderator reviews their submission and either accepts or rejects it. Accepted submissions are then inserted into the main Trac ticket database.

The intent behind this plugin is to enable open-source projects hosted on corporate or governmental computer systems to better interface with the general public. These hosting services typically do not allow anonymous users to add content to their websites (this includes adding new tickets or ticket comments). This plugin allows projects to enable anonymous ticket reporting and commenting by "quarantining" unprivileged submissions until they are reviewed by a human moderator.

Dependencies

TicketModerator requires Trac >= 0.11. It will not work with Trac versions 0.10.x or earlier.

Configuration

Install the TicketModerator egg either in your projects plugin directory, or in the system python site-packages directory. Note: if you place it in the site-packages directory, you will also need a reference to the egg to your easy-install.pth file.

To enable the plugin, add the following to the [components] section of your project's trac.ini file:

[components]
ticketmoderator.* = enabled

Note: This will require you to upgrade your Trac environment. This means logging on to your Trac server and running:

trac-admin <path-to-trac-project> upgrade

The TicketModerator plugin introduces several new permissions:

PermissionDescription
MODERATOR_MODERATOR Users with this permission may act as Moderators. They can browse all submissions in the moderation queue (pending, accepted, and rejected) and can make moderation decisions on any pending submissions.
MODERATOR_PASS_CREATE Users with this permission may directly create new tickets without being subjected to moderation.
MODERATOR_PASS_MODIFY Users with this permission may directly modify (comment on) existing tickets without being subjected to moderation.
MODERATOR_PASS_ATTACH Users with this permission may directly attach files to existing tickets without being subjected to moderation (This permission replaces the deprecated unmoderated_attachments option in trac.ini).
MODERATOR_UNMODERATED Alias for [MODERATOR_PASS_CREATE, MODERATOR_PASS_MODIFY, MODERATOR_PASS_ATTACH].

All new submissions are assigned to a Moderator. The plugin assigns a submission to the first user it identifies that has _both_ MODERATOR_MODERATOR permissions and a registered e-mail address (so that they can receive the notification). The plugin checks users in the following order:

  1. The assigned ticket owner.
  2. The default owner for the ticket Component.
  3. The default moderator (see the default_moderator option below).
  4. Any user.

If the plugin cannot identify any user with both MODERATOR_MODERATOR permissions and a registered e-mail address, then it throws a configuration error and the submission is rejected.

The TicketModerator plugin leverages the core Trac ticket notification system to send an e-mail to the assigned moderator. The moderator may accept or reject the submission through a link at the bottom of the e-mail. Moderators can also browse, view, and accept or reject submissions through the web interface by following the "Moderator" link on the Trac "MetaNav" navigation bar.

Options

The TicketModerator plugin has several configuration options, all within the [ticketmoderator] section:

OptionDescriptionDefault
default_moderatorThe default moderator assigned to new submissions; used if the ticket owner and default component owner are not Moderators (since 0.2).(None)
ignore_smtp_alwaysIf true, email sent to the ticket moderator will not be sent to the smtp_always_cc or smtp_always_bcc addresses (since 0.5).True
review_promiseText displayed as part of the default confirmation indicating the moderators expected response time (since 0.6).We make every effort to review submissions within one working day.
show_moderator_emailPublish the assigned Moderator's e-mail address as part of the confirmation presented to the submitter (since 0.2).False
subject_templateA Genshi text template snippet used to generate the notification subject (since 0.2).$prefix [Moderate] ${new and 'New Ticket' or 'Comment'}: $summary
unmoderated_attachmentsAllow users requiring moderation to submit ticket attachments without moderation (since 0.3; deprecated in 0.4: use MODERATOR_PASS_ATTACH).False

Attachments

As of version 0.5, the TicketModerator fully supports moderation of ticket attachments (both to new and existing tickets).

Trac SpamFilter Compatibility

The TicketModerator is fully compatible with the Trac  SpamFilter plugin. As designed, the SpamFilter (and all other ticket validators) get first shot at rejecting submissions outright. Only submissions that pass all other validators are sent on for human moderation. Please note, that in order to accomplish this in a rigorous manner, some submissions will pass through the SpamFilter multiple times (e.g., see #3895).

Bugs/Feature Requests

Existing bugs and feature requests for the TicketModerator plugin are here.

If you have any issues, create a new ticket.

Download

Download the current stable release zipped source, or eggs for Python 2.4, 2.5, 2.6, or 2.7.

Also see the Release History for new features and bugfixes in this release.

Source

You can check out TicketModerator from here using Subversion, or browse the source with Trac.

License

The TicketModerator plugin is distributed under the BSD license.

Recent Changes

<pre>TicketModerator, 4</pre>

Author/Contributors

Author: John Siirola (jdsiiro@…)
Contributors: