|Version 3 (modified by rekkanoryo, 5 years ago) (diff)|
Canned Responses Plugin
The CannedResponsesPlugin allows a trac administrator to specify a list of "Canned Responses" for those with the appropriate permissions to use in responding to tickets.
Each canned response can change the status of a ticket, as well as modify the resolution and add a comment. Each response can also be restricted to users with specific permissions. For example, you may wish to have a response that only users with TICKET_ADMIN permissions can use and another which anyone with TICKET_MODIFY or greater permissions can use.
Canned responses will appear as an option in the Action box at the bottom of a ticket for those with the permissions to use any of the available canned responses.
If you have any issues, create a new ticket.
Grab the latest egg from here and place it in your trac environment's plugins directory. These eggs are currently cooked for Python 2.5; if you're using a different Python version, you'll need to grab the source as described below.
If you wish not to install Mercurial but still want the source, click the link above to view the source. Then look at the tags listed near the bottom of the page. The tags will always show the plugin's name and version number. Click the "changeset" link next to that tag name. There will be a "zip" and a "gz" link at the top of the page. Either of those links will give you an archive of the source. (If you want the development source, you can click the "tip" icon and use the "zip" or "gz" links at the top of that page instead).
To enable the plugin, install it to your trac's plugins directory and add the following to your trac.ini:
[components] cannedresponses.* = enabled
To add canned responses, choose a short name, then add attributes like so:
[canned-responses] tpp = new,pending -> closed tpp.comment = This issue is caused by a third party plugin. We have no control over these plugins. Please report this problem to the authors of this third party plugin. tpp.resolution = invalid tpp.name = Third Party Plugin tpp.permissions = TICKET_MODIFY
The above example creates a canned response that sets a ticket to the closed status, sets the resolution to invalid, and adds the comment "This issue is caused by a third party plugin. We have no control over these plugins. Please report this problem to the authors of this third party plugin." The canned response is available to any user with at least TICKET_MODIFY permissions, including TICKET_ADMIN and TRAC_ADMIN.
- The line tpp = new,pending -> closed specifies the statuses a ticket may have for using this canned response and the status the ticket will be set to.
- The 'name' attribute provides a "pretty name" for users to see in the list of canned responses.
- The 'comment' attribute specifies, in WikiFormatting, the text of the comment to be added. Anything inserted into the comment field at the same time as applying a canned response will be retained and placed after the canned response.
- The 'resolution' attribute specifies the resolution to use on the ticket when closing.
- The 'permissions' attribute specifies the minimum level of permissions required to see and use the response.
Author: Daniel Atallah