Changes between Version 18 and Version 19 of CommitTicketUpdater
- Timestamp:
- Feb 3, 2015, 11:04:43 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CommitTicketUpdater
v18 v19 1 = Commit Ticket Updater =1 = Commit Ticket Updater 2 2 3 == = Description ===3 == Description 4 4 5 The 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.5 The 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, such as `closed`, `fixed`, `reopened`, the ticket status will be updated. 6 6 7 == = Hooks ===7 == Hooks 8 8 9 That role was fulfilled by the [source:branches/0.11-stable/contrib/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.9 That role was fulfilled by the [source:branches/0.11-stable/contrib/trac-post-commit-hook trac-post-commit-hook] for Subversion and previous versions of Trac (up to 0.11). Starting with Trac 0.12 and [TracRepositoryAdmin multiple repository support], a more general notification solution has been adopted. 10 10 11 11 The post-commit hooks now should simply use `trac-admin` to notify the TracEnvironment that a changeset has been 12 12 //[[span(title=trac-admin <env> changeset added <repos> <rev>,added)]]// or 13 13 //[[span(title=trac-admin <env> changeset added <repos> <rev>,modified)]]//. See TracRepositoryAdmin#ExplicitSync for more details. 14 This works for any kind of VersionControlSystem supported by Trac and can notify that information to any kind of listener, not only the commit ticket updater (see [[TracDev/ApiChanges/0.12#IRepositoryChangeListener]]).14 This works for any kind of VersionControlSystem supported by Trac and can notify that information to any kind of listener, not only the commit ticket updater, see [[TracDev/ApiChanges/0.12#IRepositoryChangeListener]]. 15 15 16 == = Location ===16 == Location 17 17 18 The `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. through the Admin interface).18 The `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 through the Admin interface. 19 19 20 == = Enable ===20 == Enable 21 21 22 A. Through the Admin interface ([/admin/general/plugin]), enable: //tracopt.ticket.commit_updater.*// modules23 a. !CommitTicketUpdater (tracopt.ticket.commit_updater.*)[[BR]][[BR]]24 B. alternatively editing`trac.ini` file, add the following line at the `[components]` section:22 1. Through the Admin interface ([/admin/general/plugin]), enable: //tracopt.ticket.commit_updater.*// modules 23 a. !CommitTicketUpdater (tracopt.ticket.commit_updater.*) 24 1. Alternatively edit the `trac.ini` file, add the following line at the `[components]` section: 25 25 {{{ 26 26 tracopt.ticket.commit_updater.committicketreferencemacro = enabled … … 28 28 }}} 29 29 30 == = Configure ===30 == Configure 31 31 32 32 {{{ … … 40 40 41 41 Where, 42 a.`commit_ticket_update_envelope` sets the required commands to be enclosed in an envelope.42 * `commit_ticket_update_envelope` sets the required commands to be enclosed in an envelope. 43 43 * Must be empty not to require an envelope; 44 44 * or contain two characters. For example, if set to "[]", then commands must be in the form of `[closes #4]`.[[BR]][[BR]] 45 a.`commit_ticket_update_commands.close`: has a space-separated list, with commands that close tickets.45 * `commit_ticket_update_commands.close`: has a space-separated list, with commands that close tickets. 46 46 * Default values to **close** a ticket: //close closed closes fix fixed fixes// [[BR]][[BR]] 47 a.`commit_ticket_update_commands.refs`: has a space-separated list, with commands that add a reference to tickets.47 * `commit_ticket_update_commands.refs`: has a space-separated list, with commands that add a reference to tickets. 48 48 * Default values to **reference** a ticket: //addresses re references refs see// 49 49 * If set to the special value //<ALL>//, all tickets referenced by the message will get a reference to the changeset.[[BR]][[BR]] 50 a.`commit_ticket_update_check_perms` when //true// checks that the committer has permission to perform the requested operations on the referenced tickets50 * `commit_ticket_update_check_perms` when //true// checks that the committer has permission to perform the requested operations on the referenced tickets 51 51 * Values: //true//, //false//[[BR]][[BR]] 52 a.`commit_ticket_update_notify`, when //true// send ticket change notification when updating a ticket.52 * `commit_ticket_update_notify`, when //true// send ticket change notification when updating a ticket. 53 53 * Values: //true//, //false// 54 54 55 == = Usage ===55 == Usage 56 56 57 The basic syntax is of the form `[command] [ticketreference]`. A colon between the command and the ticket reference is allowed. The ticketreferencealso allows to list //multiple// ticket numbers separated by spaces and/or comma. The word 'and' is also allowed between ticket numbers.57 The 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. 58 58 59 59 You can optionally refer to tickets with the following words