Edgewall Software

Changes between Version 9 and Version 10 of CommitTicketUpdater


Ignore:
Timestamp:
Apr 10, 2011, 8:26:07 PM (13 years ago)
Author:
AdrianFritz
Comment:

Ref. #10124 - adds "Enable", "Configure" and DRYs "Usage" sections

Legend:

Unmodified
Added
Removed
Modified
  • CommitTicketUpdater

    v9 v10  
    22
    33=== Description ===
     4
    45The Commit Ticket Updater is an **optional component** which makes Trac react on keywords and ticket references found in commit log message. Referenced tickets get a new comment linking to the changeset and depending on the presence of appropriate keywords (like //closed//, //fixed//, //reopened//, etc.) the ticket status will be updated.
    56
    67=== Hooks ===
     8
    79That role was fulfilled by the [source:branches/0.11-stable/trac-post-commit-hook trac-post-commit-hook] for Subversion and previous versions of Trac (up to 0.11), but starting with Trac 0.12 and [TracRepositoryAdmin multiple repository support], a more general notification solution has been adopted.
    810
     
    1315
    1416=== Location ===
    15 The `CommitTicketUpdater` component lives in `source:trunk/tracopt/ticket/commit_updater.py` and is maintained alongside the Trac core. It's included with every Trac installation as a plugin, but is not enabled by default because it's rooted in the `tracopt.` packages and not in `trac.`.   Therefore it needs to be explicitly activated (e.g. trough the Admin interface).
    1617
    17 === Syntax ===
     18The `CommitTicketUpdater` component lives in `source:trunk/tracopt/ticket/commit_updater.py` ([trac:browser//trunk/tracopt/ticket/commit_updater.py see it]) and is maintained alongside the Trac core. It's included with every Trac installation as a plugin, but is not enabled by default because it's rooted in the `tracopt.` packages and not in `trac.`.   Therefore it needs to be explicitly activated (e.g. trough the Admin interface).
     19
     20=== Enable ===
     21
     22 A. Trough the Admin interface ([/admin/general/plugin]), enable: //tracopt.ticket.commit_updater.*// modules
     23    a. !CommitTicketUpdater     (tracopt.ticket.commit_updater.*)[[BR]][[BR]]
     24 B. alternativally editing `trac.ini` file, add the following line at the appropriate section:
     25{{{
     26 TO BE FILLED-IN
     27}}}
     28
     29=== Configure ===
     30
     31{{{
     32[ticket]
     33commit_ticket_update_envelope = []
     34commit_ticket_update_commands.close =
     35commit_ticket_update_commands.refs = <ALL>
     36commit_ticket_update_check_perms = true
     37commit_ticket_update_notify = true
     38}}}
     39
     40Where,
     41 a. `commit_ticket_update_envelope` sets the required commands to be enclosed in an envelope.
     42     * Must be empty not to require an envelope;
     43     * or contain two characters. For example, if set to "[]", then commands must be in the form of `[closes #4]`.[[BR]][[BR]]
     44 a. `commit_ticket_update_commands.close`: has a space-separated list, whit commands that close tickets.
     45    * Default values to **close** a ticket: //close//, //closed//, //closes//, //fix//, //fixed//, //fixes//[[BR]][[BR]]
     46 a. `commit_ticket_update_commands.refs`: has a space-separated list, whit commands that add a reference to tickets.
     47    * Default values to **reference** a ticket: //addresses//, //re//, //references//, //refs//, //see//
     48    * If set to the special value //<ALL>//, all tickets referenced by the message will get a reference to the changeset.[[BR]][[BR]]
     49 a. `commit_ticket_update_check_perms` when //true// checks that the committer has permission to perform the requested operations on the referenced tickets
     50    * Values: //true//, //false//[[BR]][[BR]]
     51 a. `commit_ticket_update_notify`, when //true// send ticket change notification when updating a ticket.
     52    * Values: //true//, //false//
     53
     54=== Usage ===
     55
    1856The basic syntax is of the form `[command] [ticketreference]`. A colon between the command and the ticket reference is allowed. The ticketreference also allows to list //multiple// ticket numbers separated by spaces and/or comma. The word 'and' is also allowed between ticket numbers.
    19 
    20 By default, you can use the following commands (edit in `trac.ini` section `[ticket]` the values `commit_ticket_update_commands.close` and  `commit_ticket_update_commands.refs` to add or change these)
    21 * To **close** a ticket: //close//, //closed//, //closes//, //fix//, //fixed//, //fixes//
    22 * To **reference** a ticket: //addresses//, //re//, //references//, //refs//, //see//
    2357
    2458You can optionally refer to tickets with the following words
     
    2963* `closed: #10`
    3064* `closes ticket #10`
     65* `closes ticket:10`
    3166* `fixes #10`
    3267* `fixes bug: #10`