[[PageOutline(2-5,Contents,pullout)]] = Add pseudo child-tickets and a visual reference to these within a parent ticket == Description {{{#!box note With [18121] (V2.6.0) the name of the plugins component ''!TracchildticketsModule'' was changed to ''!ChildTicketsModule''. You may have to check your enable/disable settings for components after upgrading. }}} This plugin adds a child ticket tree and ''create'' buttons for adding new child tickets to the ticket page. Having child-tickets is useful when greater changes need to be managed by splitting them into subtasks. For example when developing a new, large enhancement. A single {{{bug-report}}} ticket may be created for each milestone/branch of development to group those tickets. Tickets are linked using a ticket custom field named {{{parent}}}. It is possible to create hierarchies using already existing tickets by providing link information in this field. So a slow migration to parent->child relationships is possible whenever necessary. [[Image(childtickets-ticket-page.png, border=2, width=500px)]] This and other examples of this plugin can be found [wiki:ChildTicketsPlugin/Examples here]. === Features The following features are currently supported: * Child tickets may have one or several parents * Show a child ticket tree with proper indentation and configurable depth * Ticket validator checks for: * Disallowing closing of parents when open children exist * Detecting loops in your dependencies * Making sure a parent ticket actually exists * Allow/disallow child-tickets for a certain type of ticket * Define the table headers displayed in the child ticket depending on the type * Define a default for the child type to be created * Restrict the type of possible child-tickets for each parent ticket type * Define which fields are inherited by child-tickets There are admin pages available for configuring the features but it is also possible to control them by settings in ''trac.ini''. === Background Some 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. '''Note''': The configurability of this plugin has been ported to the SubticketsPlugin. See the patches in issues 9-12 at [https://github.com/itota/trac-subtickets-plugin/issues github]. -- Chris Nelson == Bugs/Feature Requests Existing bugs and feature requests for ChildTicketsPlugin are [report:9?COMPONENT=ChildTicketsPlugin here]. If you have any issues, create a [/newticket?component=ChildTicketsPlugin new ticket]. [[TicketQuery(component=ChildTicketsPlugin&group=type,format=progress)]] == Download Download the zipped source from [export:childticketsplugin here]. == Source You can check out ChildTicketsPlugin from [/svn/childticketsplugin here] using Subversion, or [source:childticketsplugin browse the source] with Trac. == Installation General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page. The plugin makes use of the ticket custom field {{{parent}}} and so requires no extra database tables to be created. The following information is required in the `trac.ini` file: {{{#!ini [components] childtickets.* = enabled [ticket-custom] parent = text parent.format = wiki parent.label = Parent ID }}} You may create the ticket custom field from the plugins admin page. [[Image(childtickets-custom-field.png, border=2, width=500px)]] == Configuration You may configure the plugin from the admin page. [[Image(childtickets-admin-type.png, border=2, width=500px)]] Every aspect of the plugin may also be controlled by entries in the configuration file. {{{#!ini [childtickets] # 'enhancements': child tickets will typically be bug-fix tickets with the same milestone, component and keywords. parent.enhancement.allow_child_tickets = true parent.enhancement.new_child_ticket_label = New Enhancement parent.enhancement.restrict_child_type = bug-fix, task parent.enhancement.table_headers = type, status, owner, summary parent.enhancement.inherit = milestone, component, keywords # 'bug-report': child tickets will typically be bug-fix parent.bug-report.allow_child_tickets = true parent.bug-report.default_child_type = bug-fix parent.bug-report.table_headers = type, priority, owner, summary, milestone parent.bug-report.inherit = component, keywords # 'issue': child tickets will typically be task tickets with no default milestone. parent.issue.allow_child_tickets = true parent.issue.restrict_child_type = task parent.issue.table_headers = type, status, owner, summary, milestone # 'bug-fix': child tickets are not allowed. parent.bug-fix.allow_child_tickets = false # 'task': child tickets are not allowed. parent.task.allow_child_tickets = false }}} See table below for a generic description of the options. ||= Field =||= Description =||= Default value =|| || parent.**''parent-type''**.allow_child_tickets || Define whether child tickets are allowed or not || False || || parent.**''parent-type''**.table_headers || List of column headers for display in parent ticket || summary, owner || || parent.**''parent-type''**.default_child_type || Default child type || See [ticket] section of trac.ini (default_type) || || parent.**''parent-type''**.restrict_child_type || A list of possible child types, trying to create a child of a different 'type' will create an error. As of version 1.1.0, if this option is used, a list of submit buttons will be rendered allowing the user to decide which type of child ticket he/she wants to create. || None || || parent.**''parent-type''**.inherit || Define a list of inherited fields. || Default: None || || max_view_depth || Maximum depth of child ticket tree shown on the ticket page. || 3 || || recursion_warn || Depth of tree at which we assume that there is a loop in our ticket tree. || 7 || == Known Issues / Caveats * If you change the behaviour of the parent type (using for example allow_child_tickets/restrict_child_type) and tickets already have child tickets assigned to them, you will not receive a warning about any possible conflicts until you try and modify any of the child tickets. * If a parent ticket is restricted in some way that no further child tickets can be generated for that ticket 'type', you'll continue to see a list of child tickets but the 'Create' button will be missing. * The 'parent..inherit' option ensures fields are inherited by child tickets. However, all child tickets regardless of type as defined by 'restrict_child_type' will inherit these values. == Recent Changes [[ChangeLog(childticketsplugin, 3)]] == Author/Contributors '''Author:''' [wiki:walnut] [[BR]] '''Maintainer:''' [[Maintainer]] [[BR]] '''Contributors:''' [wiki:rjollos] [wiki:Cinc-th]