Modify

Opened 3 years ago

Closed 3 years ago

#8960 closed defect (fixed)

[PATCH] find children when using ChildTicketsPlugin

Reported by: bof Owned by: ChrisNelson
Priority: normal Component: TracJsGanttPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

I test using this plugin together with ChildTicketsPlugin.

That plugin uses parent custom field values including a pound sign (#1234).

While the present code of this plugin handles that format upon _display_, it doesn't handle it when searching the database for the children of a given ticket.

The appended patch fixes that, by providing a new configuration option, parent_format, to use like this:

[trac-jsgantt]
fields.parent = parent
; support ChildTicketsPlugin
parent_format = #%s

The option has a default %s which corresponds to the current use with plain ticket numbers in the custom field value.

Attachments (1)

tracjsganttplugin-childtickets-parent-format.patch (1.2 KB) - added by bof 3 years ago.
parent_format option to support ChildTicketsPlugin

Download all attachments as: .zip

Change History (6)

Changed 3 years ago by bof

parent_format option to support ChildTicketsPlugin

comment:1 Changed 3 years ago by ChrisNelson

  • Status changed from new to assigned

Thanks for the patch! I'll try to merge it soon.

comment:2 follow-up: Changed 3 years ago by rjollos

It would be nice if the author of the ChildTicketsPlugin had not chosen to store the # in the database, but I guess there is nothing we can do about that at this stage.

Have you found that the ChildTicketsPlugin does anything in particular that the SubticketsPlugin doesn't provide?

comment:3 in reply to: ↑ 2 Changed 3 years ago by bof

Replying to rjollos:

It would be nice if the author of the ChildTicketsPlugin had not chosen to store the # in the database, but I guess there is nothing we can do about that at this stage.

Somewhat agreed, but in #7839 the author provided something looking like a reasonable
justification, from one point of view, for the choice.

The ideal solution, as far as I can see, would be trac core providing a
"ticket id" custom field type that does the right thing wrt display/linking, and is stored as a plain ID.

Have you found that the ChildTicketsPlugin does anything in particular that the SubticketsPlugin doesn't provide?

I chose it, after reading the description pages, because it has a simpler
data model - just a custom parent field, no additional DB table - and because
it provides more functionality. I see that ChrisNelson provided patches for SubticketsPlugin support of most of that functionality, but it seems not to be applied to the plugin source.

For the setup I'm working on, we use ticket type to guide several unrelated workflows. The per-ticket-type configurability of ChildTicketsPlugin comes in handy:

  • per parent-type choice of which types of children to permit, including create buttons on the parent labelled by available child type
  • flexible configuration, again per parent-type, of which ticket fields to inherit (copy) to the child upon creation
  • type dependant choice of which columns to show in the subticket list on the parent

comment:4 Changed 3 years ago by ChrisNelson

(In [10406]) Support parent format from child tickets plugin. Refs #8960.

SubticketsPlugin stores parent ticket IDs as bare numbers (e.g., 1234)
but Childtickets stores the '#' prefix in the datbase (e.g., #1234).
With this change, users of ChildTicketsPlugin can set parent_ticket in
trac.ini to #%s for better integration. The default behavior is still
bare ticket IDs.

Thanks to bof (http://trac-hacks.org/wiki/bof) for this patch.

comment:5 Changed 3 years ago by ChrisNelson

  • Resolution set to fixed
  • Status changed from assigned to closed

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from ChrisNelson. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.