Changes between Version 1 and Version 2 of CustomTicketPrefixPlugin


Ignore:
Timestamp:
May 10, 2015, 11:17:01 AM (9 years ago)
Author:
Cinc-th
Comment:

Added configuration example

Legend:

Unmodified
Added
Removed
Modified
  • CustomTicketPrefixPlugin

    v1 v2  
    55== Description
    66
    7 Specify a ticket like {{{PREFIX:#1234}}} similar to intertrac links. The difference is it will be rendered like normal ticket links with the proper hint holding ticket information instead of intertrac information. Closed tickets will be rendered properly as strike through.
     7Specify 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.
    88
    99This 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:
     
    3737This is a single file plugin. For installation just copy the python file to you plugin directory.
    3838
     39== Example
     40To define a ticket prefix add the following to your ''trac.ini'':
     41
     42{{{#!ini
     43[ticket-prefix]
     44prefix = Pre1, Foo, BAR
     45}}}
     46
     47As you can see, it's possible to define several prefixes.
     48
     49You 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.
     50
     51* {{{#1234}}}
     52* {{{Pre1:#1234}}}
     53* {{{Foo:#1234}}}
     54* {{{Bar:#1234}}}
     55
     56A closed ticket would be rendered like:
     57* ~~{{{#123}}}~~
     58* ~~{{{Pre1:#123}}}~~
     59* ~~{{{Foo:#123}}}~~
     60* ~~{{{Bar:#123}}}~~
     61
     62
     63
    3964== Recent Changes
    4065