Changes between Initial Version and Version 1 of ChildTicketsPlugin


Ignore:
Timestamp:
Apr 19, 2010, 3:11:35 PM (14 years ago)
Author:
Mark Ryan
Comment:

New hack ChildTicketsPlugin, created by walnut

Legend:

Unmodified
Added
Removed
Modified
  • ChildTicketsPlugin

    v1 v1  
     1[[PageOutline(2-5,Contents,pullout)]]
     2
     3= Support for pseudo child-tickets and a visual reference to these within a parent ticket. =
     4
     5== Description ==
     6
     7Some time ago I came across the problem of how to manage child tickets in a meaningful fashion, we were using [wiki:coderanger]'s original [wiki:MasterTicketsPlugin] and it was great until we started to allow tickets to be viewed and created by people outside of our immediate development group. We found that people who were not familiar with our processes would simply create child tickets of the wrong 'type' and needed some help in getting it right. In addition, users found that the lack of visual information (ie. what are this tickets child tickets?) was also a hindrance.
     8
     9Having child-tickets is extremely useful when it comes to managing multiple releases (ie. a single 'bug-report' ticket and a single 'bug-fix' ticket for each milestone/branch of development), for managing sub-tasks of an issue and for managing 'bug-fixes' required when developing a new (larger) enhancement.
     10
     11This plugin modifies the ticket description box and adds a child ticket listing table and a 'create' button for adding new child tickets. It has the following features:
     12
     13 * It is possible to control in trac.ini the following aspects of child-ticket creation/viewing:
     14   * allow/disallow child-tickets for a certain type of ticket
     15   * to define the table headers displayed in the parent ticket
     16   * to define a default for the child type to be created
     17   * to restrict the type of child-ticket
     18   * to define whether the parent milestone is adopted by child tickets or not
     19
     20Under Trac 0.10 I had to modify the ticket.html templates to get this working in any 'pretty' sense so I have not provided support for 0.10. As of 0.11, the ITemplateStreamFilter allows this to be incorporated nicely into a neat plugin. I have not tried it with 0.12 yet.
     21
     22In order to keep the plugin as compact and simple as possible and to allow future compatibility with different CSS schemes, I have simply 'pinched' the existing CSS classes for generating the table and its components.
     23
     24== Configuration ==
     25
     26The plugin makes use of the 'ticket-custom' field and so requires no extra db tables to be created. The following fields are required in the 'trac.ini' (see table below for a generic description of the options):
     27
     28{{{
     29[components]
     30childtickets.* = enabled
     31childtickets.childtickets.tracchildticketsmodule = enabled
     32
     33[ticket-custom]
     34parent = text
     35parent.format = wiki
     36parent.label = Parent ID
     37
     38[childtickets]
     39
     40# 'enhancements' : child tickets will typically be bug-fix tickets with the same milestone.
     41parent.enhancement.allow_child_tickets = true
     42parent.enhancement.table_headers = type, status, owner, summary
     43parent.enhancement.default_child_type = bug-fix
     44parent.enhancement.restrict_child_type = bug-fix, task
     45parent.enhancement.inherit_milestone = true
     46
     47# 'bug-report' : child tickets will typically be bug-fix
     48parent.bug-report.allow_child_tickets = true
     49parent.bug-report.default_child_type = bug-fix
     50parent.bug-report.table_headers = type, priority, owner, summary, milestone
     51parent.bug-report.inherit_milestone = false
     52
     53# 'issue' : child tickets will typically be task tickets with no default milestone.
     54parent.issue.allow_child_tickets = true
     55parent.issue.default_child_type = task
     56parent.issue.table_headers = type, status, owner, summary, milestone
     57parent.issue.inherit_milestone = false
     58
     59# 'bug-fix' : child tickets are not allowed.
     60parent.bug-fix.allow_child_tickets = false
     61
     62# 'task' : child tickets are not allowed.
     63parent.task.allow_child_tickets = false
     64
     65}}}
     66
     67=== [childtickets] ===
     68
     69|| parent.<type>.allow_child_tickets || Define whether child tickets are allowed or not ||
     70|| parent.<type>.table_headers || List of column headers for display in parent ticket ||
     71|| parent.<type>.default_child_type || Default child type ||
     72|| parent.<type>.restrict_child_type || A list of possible child types, trying to create a child of a different 'type' will create an error. ||
     73|| parent.<type>.inherit_milestone || Define whether the child will adopt the parent ticket's milestone ||
     74
     75
     76
     77== Bugs/Feature Requests ==
     78
     79Existing bugs and feature requests for ChildTicketsPlugin are
     80[report:9?COMPONENT=ChildTicketsPlugin here].
     81
     82If you have any issues, create a
     83[http://trac-hacks.org/newticket?component=ChildTicketsPlugin&owner=walnut new ticket].
     84
     85== Download ==
     86
     87Download the zipped source from [download:childticketsplugin here].
     88
     89== Source ==
     90
     91You can check out ChildTicketsPlugin from [http://trac-hacks.org/svn/childticketsplugin here] using Subversion, or [source:childticketsplugin browse the source] with Trac.
     92
     93== Example ==
     94
     95=== Handling multiple bug-fixes for single bug-report ===
     96
     97In my last job using trac with svn, we had a branch of development for each milestone of development plus a 'special' milestone to assign for hotfix/patches. Rather than creating a single 'bug-fix' ticket and commenting on the ticket that the fix had been applied to milestone X on branch X, milestone Y on branch Y, etc..., we would create a single 'bug-report' ticket (with version info but no milestone) and this ticket would, after assessment from developers/project-mgr, have a bug-fix child-ticket created per milestone - each with its own life-cycle, priority, (sometimes) developer, etc ...
     98
     99[[Image(bug-report-example.jpg?format=raw, 50%)]]
     100
     101=== Handling sub-tasks from a single issue ===
     102
     103Probably self explanatory: you have something that needs to be done by several different people. Split it up into sub-tasks.
     104
     105[[Image(bug-report-example.jpg?format=raw, 50%)]]
     106
     107=== A New Feature generates bugs ===
     108
     109When developing a new feature (a single ticket), our developers would 'finish' the feature and pass it to our testing department. The feature, on the whole, might be OK but require several days testing. Within that time several bugs are generated as a direct result of this new feature. It makes no sense to pass the original feature ticket back to the developers (the feature has not been 'rejected' and is still in testing!), so instead, the testing tem can make 'bug-fix' child-tickets for this parent ticket. The feature might even be released with known bugs but at least they're recorded and owned by someone/somewhere!
     110
     111== Recent Changes ==
     112
     113[[ChangeLog(childticketsplugin, 3)]]
     114
     115== Author/Contributors ==
     116
     117'''Author:''' [wiki:walnut] [[BR]]
     118'''Maintainer:''' [wiki:walnut] [[BR]]
     119'''Contributors:'''