Create Ticket
Warning Can't synchronize with repository "(default)" (Couldn't open Subversion repository /x1/svn/asf/bloodhound: SubversionException: ("Expected FS format between '1' and '4'; found format '6'", 160043)). Look in the Trac log for more information.
Last modified 11 months ago Last modified on May 20, 2013 9:25:18 AM

BEP 6 : Ticket Relations

BEP 6
Title Ticket Relations
Version Draft
Last-Modified
Author
Status Draft
Type Standards Track
Content-Type text/x-trac-wiki
Created
Post-History

Abstract

One of the deficiencies in the ticket handling workflow is the lack of any kind of ticket relations. Although referencing other tickets is possible in the fields that support WikiFormatting (e.g. comments), this is far from ideal. In order to fully support advanced ticket handling workflows, implementation of first-class ticket relations is vital.

Motivation

Most, if not all competing issue tracking products provide at least one type of ticket relations. Attracting a wider audience in terms of both customers and developers may prove even more difficult without such functionality. There are several Trac plugins available which implement ticket relations to some extent, however without support for multiple relation types.

Proposal

Ticket relations can be implemented either as a Bloodhound addon, or as a Trac plugin. The latter may be the preferred choice, as Trac users could also benefit from this feature.

This has also been discussed to some extent on the bloodhound-dev mailing list, Ryan proposed merging two existing Trac plugins (MasterTicketsPlugin and SubticketsPlugin) into one, and continuing from there.

Details

Ticket relations are defined by source ticket, target ticket and relation type. Source and target tickets can belong to different products. The following relation types shall be implemented by default:

Duplicate
indicates the defect was already reported in another ticket. This type should be bound to the "duplicate" ticket state. When a ticket is resolved as duplicate, users should be required to enter the ID of the original ticket.
Parent/child
allows for splitting "larger" tickets into sub-tickets for more fine-grained control. This is especially useful for the "task" type tickets. Multiple levels of hierarchy should be supported.
Dependency/blocker
a ticket cannot be resolved until all of its dependencies have been resolved.
Related
an association between tickets that imposes no constraints.

Additionally it should be possible to define custom relation types with no semantic meaning through the admin interface.

Ticket Relations with Regards to Other New Features

Multiproduct (BEP-0003)

In addition to relations within one product, this feature will allow referencing tickets from other products as well. This will enable easier tracking of closely related products, e.g. a Bloodhound ticket could be marked as dependent on a Trac ticket, or vice-versa.

If relationships are designed in terms of resources then resource neighborhoods proposal might be the foundations to link resources (e.g. tickets) to other resources managed by external systems . This is similar to Trac Relations but with neighborhood realm and ID added in resource_main and resource_dest).

Improved Search Architecture (BEP-0004)

The new search functionality should also allow searching for ticket relations. This will enable users to quickly find dependencies, duplicates, sub-tasks etc. Search should also be inter-product, i.e. able to find related tickets from other products.

User interface

Ticket relations will be displayed in the ticket view, below the ticket properties as depicted in the image below. The ticket view will also allow for removal of relations, one at a time, by clicking on the remove icons.

The "Manage Relations" button will open up the full form for adding and removing ticket relations, presented in the image below.

Handling of duplicates will be bound to marking a ticket as a duplicate. In that case the user will also have to enter the ID of the duplicate ticket.

Constraints

Each ticket can have multiple relations to other tickets, and those relations can be of different types. There are however certain constraints that should enforced by implementation:

  • A ticket with parent/child relationships cannot relate to its ancestors or descendants with another relation type (i.e. a parent cannot be marked as a duplicate/blocker of its children or vice-versa).
  • Parent/child relationships should be "one-way" (i.e. tree hierarchy, not a graph with backward relationships).
  • Parent/child relationships cannot reference multiple products.
  • A ticket cannot be marked as a duplicate of a ticket from a different product.
  • A ticket cannot be marked as a duplicate of a newer ticket (only vice-versa).
  • A ticket cannot be marked as a blocker of another ticket, if this creates a blocker cycle.
  • A parent ticket cannot be closed until all of it's children are closed.
  • A dependency (blocked) ticket cannot be closed until it's blocker is closed.

Usage Scenarios

Some usage scenarios may need additional/special handling:

  • What to do if a duplicate is reopened, i.e. it turns out it wasn't a duplicate after all? Should the duplicate relation be removed (and user informed beforehand)?
  • Should parent/child relations be allowed only for tasks and possibly enhancements? Does it make sense for defects to be split in this manner?

Backwards compatibility

In general there are no compatibility issues with previous versions, except for the duplicate relations. Currently duplicate tickets are only marked as such, with no indication of which ticket is the original in question. Since the duplicate ID will become required, existing tickets will either need to be upgraded somehow, or left as they are and handled in a special manner.

Resources

Source code management is powered by Apache™ Subversion.

UI mockups were made using Balsamiq Web Demo http://builds.balsamiq.com/b/mockups-web-demo/

Reference Implementation

Bloodhound relations plugin is under active development by the Bloodhound community. It is possible to check out the source using Apache™ Subversion by executing the following command

$ svn co https://svn.apache.org/repos/asf/incubator/bloodhound/trunk/bloodhound_relations

Bloodhound Relations plugin ticket summary

  More   
(25 total rows)
Ticket Summary Status Priority Milestone
#519 trac-admin deploy command fails closed blocker Release 6
#644 Crash on SMTP failure notifying ticket relations update closed blocker Release 8
#670 Relation type is empty closed critical
#750 Invalid ticket ID in relation makes ticket view crash closed critical
#521 Relations error on ticket page closed major Release 6
#522 Implement Bloodhound Relation widget on the ticket page closed major Release 6
#523 Implement Bloodhound Relation management page closed major Release 6
#524 Implement Bloodhound Relation change notifications closed major Release 6
#528 Implement Bloodhound Relations constraints closed major Release 6
#534 Integration of relations and search closed major Release 6
#537 Better handling of relation errors closed major Release 6
#588 Integrate duplicate relations to ticket workflow closed major Release 7
#611 'Duplicate of' relationship for newer tickets closed major
#629 Fix ambiguity of ticket relations closed major Release 7
#630 No relations types after upgrading 0.5.3 instance closed major Release 7
#632 Navigation items in ticket relations UI new major next 0.x
#690 Highlight closed tickets in relations widget closed major Release 8
#742 Duplicate relation can't be set on action other than "fixed" closed major Release 8
#746 Parent/child relations are inverted in ticket validation closed major Release 8
#775 Can't create multiple "is a parent of" relations closed major Release 8
#776 The validation error messages in bhrelations.validation should be marked as translatable strings new major next 0.x
#786 Duplicate ticket id input isn't present after validation failure new major next 0.x
#582 Relations widget component is displayed separate from Relations plugin on Plugin admin panel closed minor Release 7
#634 Ticket comments overlap edit workflow drop-down dialog new minor Release 9
#672 Edit ticket relationships new minor Unscheduled

References

Trac Proposals

Trac tickets

  • #31 Bug dependencies/relations feature
  • #886 Add support for Master tickets

Bloodhound Proposals

Trac plugins

Copyright © 2009-2012 The Apache Software Foundation
Licensed under the Apache License, Version 2.0.

Apache Bloodhound, Apache, the Apache feather logo, and the Apache Bloodhound project logo are trademarks of The Apache Software Foundation.

Attachments

Download all attachments as: .zip