wiki:CustomTicketPrefixPlugin

Version 4 (modified by Cinc-th, 8 years ago) (diff)

Add Trac 1.0 tag and add information about 0.12 and 1.0 versions of plugin.

Define custom ticket prefixes to link commit messages with Trac instances or group tickets

Description

Specify a ticket like PREFIX:#1234 similar to intertrac links. The difference is it will be rendered like a normal TracLink #1234 with the proper hint holding ticket information instead of intertrac information. Closed tickets will be rendered properly as strike through.

This is useful if you have several Trac instances referencing the same repository. By defining different prefixes for each instance it is possible to reference the correct instance in the commit message. For example:

Foo:#123: fix for encoding error in function bar().

In the repo browser of Trac instance Foo the link is rendered correctly and shows the ticket status from the commit message.

This plugin is tested with Trac 0.12, and is probably compatible with Trac 1.x too.

Bugs/Feature Requests

Existing bugs and feature requests for CustomTicketPrefixPlugin are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from here.

Source

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

Installation

This is a single file plugin. For installation just copy the Python file to you plugin directory. There are versions for Trac 0.12 and Trac 1.0.

Example

To define a ticket prefix add the following to your trac.ini file:

[ticket-prefix]
prefix = Pre1, Foo, BAR

As you can see, it's possible to define several prefixes.

You may now reference any ticket by prepending the ticket with the defined prefix(es). With the given example the following links are all referencing the same ticket and all links are rendered the same way:

  • #1234
  • Pre1:#1234
  • Foo:#1234
  • Bar:#1234

A closed ticket would be rendered like:

  • #123
  • Pre1:#123
  • Foo:#123
  • Bar:#123

Recent Changes

15373 by Cinc-th on 2016-02-29 13:02:34
Add Trac 1.0 compatible version of the plugin.
14579 by Cinc-th on 2015-05-10 12:16:53
Initial check in of CustomTicketPrefixPlugin.
14578 by Cinc-th on 2015-05-10 11:03:51
New hack CustomTicketPrefixPlugin, created by Cinc-th
(more)

Author/Contributors

Author: Cinc-th
Maintainer: Cinc-th
Contributors: