[[PageOutline(2-5,Contents,pullout)]] = Create new tickets from an existing ticket == Description This plugin adds configurable buttons in the ticket header to create related tickets. The new ticket can inherit field values from the current ticket. == Bugs/Feature Requests Existing bugs and feature requests for TicketCreateButtonsPlugin are [report:9?COMPONENT=TicketCreateButtonsPlugin here]. If you have any issues, create a [/newticket?component=TicketCreateButtonsPlugin new ticket]. [[TicketQuery(component=TicketCreateButtonsPlugin&group=type,format=progress)]] == Download Download the zipped source from [export:ticketcreatebuttonsplugin here]. == Source You can check out TicketCreateButtonsPlugin from [/svn/ticketcreatebuttonsplugin here] using Subversion, or [source:ticketcreatebuttonsplugin browse the source] with Trac. == Installation '''Notes''': 1. Below instructions could be specific to some operating systems. Please help expanding these instructions. 1. Generic installation guidelines are available at [TracPlugins#InstallingaTracplugin TracPlugins]. 1. The use of `[sudo]` is optional when you already have authorisation to modify your server settings. '''Installation steps''': 1. '''Install''' plugin: * with easy_install, globally: {{{#!sh [sudo] easy_install https://trac-hacks.org/svn/ticketcreatebuttonsplugin }}} * You might be required to select a specific `tag`, `branch`. Defaults to select from `trunk`[[BR]][[BR]] 1. '''Enable''' this component as follows: * by updating [wiki:TracIni trac.ini] file under appropriate configuration section: {{{#!ini [components] ... ticketcreatebuttons.* = enabled ... }}} * or accessing your Admin panel under selected Trac environment {{{ ..admin/general/plugins }}}. [[BR]][[BR]] 1. '''Configure''' Trac environment as follows: * by updating [wiki:TracIni trac.ini] file under appropriate configuration section: i. case using this plugin with SubticketsPlugin {{{#!ini [ticket-create-buttons] parents.tag = .//td[@headers="h_parents"] parents.label = Create parents.title = Create a new sibling parents.inherit = type, milestone, parents }}} * or accessing your Admin panel under selected Trac environment {{{ ..admin/general/plugins}}}. [[BR]][[BR]] 1. '''Restart''' web server: * Apache on Ubuntu, example command line: {{{#!sh [sudo] /etc/init.d/apache2 restart }}} [[BR]] 1. '''Test''' if this component is working properly, ie the main environment and any secondary ones. 1. If the plugin is installed correctly, the configuration you have made should reflect on these tickets. == Configuration Under the appropriate section inside a TracIni file you can customize ticket properties as follows: {{{#!ini [ticket-create-buttons] . = value }}} where `. = value` can be any from the below: * R - Required * O - Optional ||'''Argument''' ||'''Version''' ||'''R / O''' ||'''Description''' ||'''Default''' || || `tag` || >= 0.1 || 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 || || `label` || >= 0.1 || O ||The label for the button.[[BR]]* Example: {{{ blockedby.label = Create }}} || `` || || `title` || >= 0.1 || O ||The HTML title element used as a tool tip for the button.[[BR]]* Example: {{{ blockedby.title = Create predecessor }}} || None || || `inherit` || >= 0.1 || 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 }}} || No fields are inherited. || || `link` || >= 0.1 || 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 || || `set` || >= 0.1 || 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 || === Sample configurations 1. '''Example''': Using this plugin with MasterTicketsPlugin, the following configuration creates buttons to create predecessor and successor tickets: {{{#!ini [ticket-create-buttons] blockedby.tag = .//td[@headers="h_blockedby"] blockedby.label = Create blockedby.title = Create a new predecessor blockedby.inherit = type, milestone blockedby.link = blocking:id blocking.tag = .//td[@headers="h_blocking"] blocking.label = Create blocking.title = Create a new successor blocking.inherit = type, milestone blocking.link = blockedby:id }}} 1. '''Example''': When used with SubticketsPlugin, new siblings can be created with: {{{#!ini [ticket-create-buttons] parents.tag = .//td[@headers="h_parents"] parents.label = Create parents.title = Create a new sibling parents.inherit = type, milestone, parents }}} == Recent Changes [[ChangeLog(ticketcreatebuttonsplugin, 3)]] == Author/Contributors '''Author:''' [wiki:ChrisNelson] [[BR]] '''Maintainer:''' [[Maintainer]] [[BR]] '''Contributors:'''