wiki:TicketCreateButtonsPlugin

Version 5 (modified by AdrianFritz, 2 years ago) (diff)

More install details.

Ticket Create Buttons plugin

Description

The TicketCreateButtons plugin creates configurable buttons in the ticket header to create related tickets. The new ticket can inherit field values from the current ticket.

Usage

  1. Under the appropriate section inside a TracIni file you can customize ticket properties as below:
      [ticket-create-buttons]
      <field-name>.<argument> = value
    
    • Where <field-name>.<argument> = value can be one or many from below:
      • R - Required
      • 0 - 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.
* Example: blockedby.tag = .//td[@headers="h_blockedby"]
None
label >= 0.1 O The label for the button.
* Example: blockedby.label = Create
<field-name>
title >= 0.1 O The HTML title element used as a tool tip for the button.
* 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.
* 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.
* 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.
* Example: set = keywords:Foo sets the new ticket's keywords field to Foo.
None
  1. Example - Using this plugin with MasterTicketsPlugin, the following configuration creates buttons to create predecessor and successor tickets:
    [ticket-create-buttons]
    blockedby.tag = .//td[@headers=&#34;h_blockedby&#34;]
    blockedby.label = Create
    blockedby.title = Create a new predecessor
    blockedby.inherit = type, milestone
    blockedby.link = blocking:id
    
    blocking.tag = .//td[@headers=&#34;h_blocking&#34;]
    blocking.label = Create
    blocking.title = Create a new successor
    blocking.inherit = type, milestone
    blocking.link = blockedby:id
    
  2. Example - When used with SubticketsPlugin, new siblings can be created with:
    [ticket-create-buttons]
    parents.tag = .//td[@headers=&#34;h_parents&#34;]
    parents.label = Create
    parents.title = Create a new sibling
    parents.inherit = type, milestone, parents
    

Installation

  1. Be noticed:
    1. Below instructions should be specific for some O.S. Please, help expanding this instructions.
    2. Broader installation guidelines are made available at TracPlugins
    3. Sections not used, are suggested to be kept under comment. In future you might need it. For example:
      {{{
      #!comment
      1. '''Check''' dependencies:
         i. none required
         * ,,`[sudo]` is optional case you already have enough authority to modify your server.,,[[BR]][[BR]]
      }}}        
      


  2. Install plugin:
    • globally, on Linux, with easy_install:
      $ [sudo] easy_install https://trac-hacks.org/svn/ticketcreatebuttonsplugin
      
      • [sudo] is optional case you already have enough authority to modify your server.
      • You might be required to select a specific tag, branch. Defaults to select from trunk

  3. Enable this component as follows:
    • by updating trac.ini file under appropriate configuration section;
      [components]
      ...
      ticketcreatebuttons.* = enabled
      ...
      
    • or accessing your Admin panel ( ..admin/general/plugins , case you have WebAdminPlugin enabled);

  4. Configure environment as follows:
    • by updating trac.ini file under appropriate configuration section;
      1. case using this plugin with SubticketsPlugin
        [ticket-create-buttons]
        parents.tag = .//td[@headers=&#34;h_parents&#34;]
        parents.label = Create
        parents.title = Create a new sibling
        parents.inherit = type, milestone, parents
        
    • or accessing your Admin panel ( ..admin/general/plugins , case you have WebAdminPlugin enabled);

  5. Restart web server on command line:
    $ [sudo] /etc/init.d/apache2 restart
    
    • [sudo] is optional case you already have enough authority to modify your server.
    • Above example command line is for Apache on Ubuntu.

  6. Test if this component is working properly.
    1. If the plugin is installed correct, the configuration you have made should reflect on tickets.

Bugs/Feature Requests

Existing bugs and feature requests for TicketCreateButtonsPlugin.

If you have any issues, create a new ticket (please review base before creating).

Source & Download

You can check out TicketCreateButtonsPlugin using Subversion, or browse the source with Trac, or download the zipped source.

Recent Changes

[9441] by ChrisNelson on 2010-11-18 16:30:03
Initial commit to Trac-Hacks
[9440] by ChrisNelson on 2010-11-18 15:20:07
New hack TicketCreateButtonsPlugin, created by ChrisNelson

Author/Contributors

Author: ChrisNelson
Maintainer: ChrisNelson
Contributors: