| 9 | == Usage == |
| 10 | |
| 11 | 1. Inside a TracIni file you can customize ticket properties |
| 12 | {{{ |
| 13 | [ticket-create-buttons] |
| 14 | <ticket-name>.<argument> = value |
| 15 | }}} |
| 16 | * Where `<ticket-name>.<argument> = value` can be one or many from: |
| 17 | ||'''Argument'''[[BR]] ||'''Version'''[[BR]] ||'''Required (R)[[BR]]Optional (O)''' ||'''Description'''[[BR]] ||'''Default'''[[BR]] || |
| 18 | || `tag` || || R ||Argument to `genshi.filters.Transfomer` used to find the ticket form element to which the button will be prepended. Typically a custom field name.[[BR]]* Example: {{{ blockedby.tag = .//td[@headers="h_blockedby"] }}} || None || |
| 19 | || `label` || || R ||The label for the button.[[BR]]* Example: {{{ blockedby.label = Create }}} || None || |
| 20 | || `title` || || R ||The HTML title element used as a tool tip for the button.[[BR]]* Example: {{{ blockedby.title = Create a new predecessor }}} || None || |
| 21 | || `inherit` || || O ||Comma-separated list of fields whose values should be inherited from the current ticket. If present but blank, no fields are inherited.[[BR]]* Example: {{{ blockedby.inherit = type, milestone }}} || None || |
| 22 | || `link` || || O ||Comma-separated list of `newfield:currentfield` pairs used to link the two tickets. The `link` field override `inherit` field.[[BR]]* Example: {{{ blockedby.link = blocking:id }}} sets the new ticket's blockedby field to the current tickets id. || None || |
| 23 | || `set` || || O ||Comma-separated list of `field:value` pairs for setting values in the new ticket. The `set` field override `inherit` and `link` fields. [[BR]]* Example: {{{ set = keywords:Foo }}} sets the new ticket's keywords field to Foo.|| None || |
| 24 | 2. Example - Using the plugin with MasterTicketsPlugin, the following configuration creates buttons to create predecessor and successor tickets: |
| 25 | {{{ |
| 26 | [ticket-create-buttons] |
| 27 | blockedby.tag = .//td[@headers="h_blockedby"] |
| 28 | blockedby.label = Create |
| 29 | blockedby.title = Create a new predecessor |
| 30 | blockedby.inherit = type, milestone |
| 31 | blockedby.link = blocking:id |
| 32 | |
| 33 | blocking.tag = .//td[@headers="h_blocking"] |
| 34 | blocking.label = Create |
| 35 | blocking.title = Create a new successor |
| 36 | blocking.inherit = type, milestone |
| 37 | blocking.link = blockedby:id |
| 38 | }}} |
| 39 | 1. Example - When used with SubticketsPlugin, new siblings can be created with: |
| 40 | {{{ |
| 41 | parents.tag = .//td[@headers="h_parents"] |
| 42 | parents.label = Create |
| 43 | parents.title = Create a new sibling |
| 44 | parents.inherit = type, milestone, parents |
| 45 | }}} |
| 46 | |
| 47 | == Installation == |
| 48 | |
| 49 | 1. '''Be noticed''' |
| 50 | 1. below instructions should be specific for some O.S. Please, help improving them. |
| 51 | 1. broader installation guidelines are made available on [http://trac.edgewall.org/wiki/TracPlugins TracPlugins] |
| 52 | {{{ |
| 53 | #!comment |
| 54 | 1. '''Check''' dependencies: |
| 55 | i. none required |
| 56 | |
| 57 | * ,,`[sudo]` is optional case you already have enough authority to modify your server.,,[[BR]][[BR]] |
| 58 | }}} |
| 59 | 1. '''Install''' plugin: |
| 60 | * globally, on Linux, with easy_install: |
| 61 | {{{ |
| 62 | #!sh |
| 63 | $ [sudo] easy_install https://trac-hacks.org/svn/ticketcreatebuttonsplugin |
| 64 | }}} |
| 65 | * ,,`[sudo]` is optional case you already have enough authority to modify your server.,, |
| 66 | * ,,You might be required to select a specific `tag`, `branch`. Defaults to select from `trunk`,,[[BR]][[BR]] |
| 67 | 1. '''Enable''' this component by updating TracIni file as follows: |
| 68 | {{{ |
| 69 | [components] |
| 70 | ticketcreatebuttons.* = enabled |
| 71 | }}} |
| 72 | 1. '''Configure''' this component in its own configuration section, by updating TracIni file as follows: |
| 73 | i. case using this plugin with SubticketsPlugin |
| 74 | {{{ |
| 75 | parents.tag = .//td[@headers="h_parents"] |
| 76 | parents.label = Create |
| 77 | parents.title = Create a new sibling |
| 78 | parents.inherit = type, milestone, parents |
| 79 | }}} |
| 80 | 1. '''Restart''' web server on command line: |
| 81 | {{{ |
| 82 | #!sh |
| 83 | $ [sudo] /etc/init.d/apache2 restart |
| 84 | }}} |
| 85 | * ,,`[sudo]` is optional case you already have enough authority to modify your server.,,[[BR]][[BR]] |
| 86 | 1. '''Test''' if this component is working properly. |
| 87 | 1. If the plugin is installed correct, the example shown in the [#Usage] section on this page should reflect on tickets.[[BR]][[BR]] |
| 88 | |
21 | | == Source == |
22 | | |
23 | | You can check out TicketCreateButtonsPlugin from [http://trac-hacks.org/svn/ticketcreatebuttonsplugin here] using Subversion, or [source:ticketcreatebuttonsplugin browse the source] with Trac. |
24 | | |
25 | | == Example == |
26 | | |
27 | | Using the plugin with MasterTicketsPlugin, the following configuration creates buttons to create predecessor and successor tickets: |
28 | | |
29 | | {{{ |
30 | | [ticket-create-buttons] |
31 | | blockedby.tag = .//td[@headers="h_blockedby"] |
32 | | blockedby.label = Create |
33 | | blockedby.title = Create a new predecessor |
34 | | blockedby.inherit = type, milestone |
35 | | blockedby.link = blocking:id |
36 | | |
37 | | blocking.tag = .//td[@headers="h_blocking"] |
38 | | blocking.label = Create |
39 | | blocking.title = Create a new successor |
40 | | blocking.inherit = type, milestone |
41 | | blocking.link = blockedby:id |
42 | | }}} |
43 | | |
44 | | When used with SubticketsPlugin, new siblings can be created with: |
45 | | |
46 | | {{{ |
47 | | parents.tag = .//td[@headers="h_parents"] |
48 | | parents.label = Create |
49 | | parents.title = Create a new sibling |
50 | | parents.inherit = type, milestone, parents |
51 | | }}} |
52 | | |
53 | | == Recent Changes == |
| 99 | === Recent Changes === |