Edgewall Software
Modify

Opened 8 years ago

Last modified 2 years ago

#10755 new enhancement

CommitTicketUpdater does not allow user to define what state to jump to

Reported by: patrick.little Owned by:
Priority: normal Milestone: next-major-releases
Component: ticket system Version: 0.12.3
Severity: normal Keywords: CommitTicketUpdater
Cc: ethan.jucovy@…, sterkrig@…, skrattaren@… Branch:
Release Notes:
API Changes:

Description

The CommitTicketUpdater will only ever close a ticket. In general, the closed state is for when no more work is to be done, aka after QA has verified the fix. Trac should allow configuration of what state name the ticket will get updated to.

Attachments (0)

Change History (21)

comment:1 by anonymous, 8 years ago

Yes, this would be a nice feature. I've wanted to be able to define reopens as a keyword that changes the state of the ticket to reopened, as well as transition tickets that are fixed from acceptedimplemented, rather than from accepted to closed.

comment:2 by Ryan J Ollos <ryano@…>, 8 years ago

Cc: ryano@… added

comment:3 by clemens@…, 7 years ago

This would be cool!

In addition, it would be great if the CommitTicketUpdater would use the default_resolution configured in the [ticket] section of trac.ini if no other state has been specified. Currently, it sets the state to fixed (hard-coded in commit_updater.py, line 251), although my custom workflow has no fixed state.

comment:4 by ethan.jucovy@…, 7 years ago

Cc: ethan.jucovy@… added

comment:5 by Paul Wise <pabs3@…>, 7 years ago

For those who are looking for a workaround for this lack of feature, I added a simple plugin to do what I wanted:

from tracopt.ticket.commit_updater import CommitTicketUpdater

class CustomCommitTicketUpdater(CommitTicketUpdater):

	def cmd_close(self, ticket, changeset, perm):
		if not self.check_perms or 'TICKET_MODIFY' in perm:
			ticket['status'] = 'reviewing'
			ticket['owner'] = ticket['reporter']

in reply to:  5 comment:6 by patrick.little@…, 7 years ago

Replying to Paul Wise <pabs3@…>:

For those who are looking for a workaround for this lack of feature, I added a simple plugin to do what I wanted:

from tracopt.ticket.commit_updater import CommitTicketUpdater

class CustomCommitTicketUpdater(CommitTicketUpdater):

	def cmd_close(self, ticket, changeset, perm):
		if not self.check_perms or 'TICKET_MODIFY' in perm:
			ticket['status'] = 'reviewing'
			ticket['owner'] = ticket['reporter']

I've tried following the various tutorials and I just can't get the plugin to show up in my admin panel. I can follow the t-h.o egg cooking tutorial and get the helloworld example to show up, but when I switch over to this code nothing shows up.

comment:7 by Christian Boos, 7 years ago

Milestone: unscheduled

A few configuration options for the commit ticket updater could indeed help.

PatchWelcome.

in reply to:  5 comment:8 by brad@…, 7 years ago

I find that the simple plugin approach works but there's something odd going on as the ticket goes to 'closed' first and then the custom updater moves it to 'reviewing' (or 'test' or whatever), resulting in two entries in the ticket's history. It's like the base implementation is being called and the simple plugin is not overriding that behaviour. Am I missing something simple here?

comment:9 by Remy Blank, 7 years ago

If your plugin subclasses CommitTicketUpdater, you need to disable the base component (tracopt.ticket.commit_updater.CommitTicketUpdater) in trac.ini.

in reply to:  9 comment:10 by anonymous, 7 years ago

Replying to rblank:

If your plugin subclasses CommitTicketUpdater, you need to disable the base component (tracopt.ticket.commit_updater.CommitTicketUpdater) in trac.ini.

That works perfectly. Many thanks.

comment:11 by Ryan J Ollos, 7 years ago

Cc: ryano@… removed

comment:12 by sterkrig@…, 6 years ago

Cc: sterkrig@… added

comment:13 by Ryan J Ollos, 6 years ago

Keywords: CommitTicketUpdater added

comment:14 by skrattaren, 6 years ago

Cc: skrattaren@… added

comment:15 by patrick.little@…, 6 years ago

Please clear the reported by field - I no longer am using Trac and do not want to keep getting ticket updates when something changes.

comment:16 by Ryan J Ollos, 6 years ago

Reporter: changed from patrick.little@… to patrick.little

comment:17 by Ryan J Ollos, 6 years ago

Milestone: unschedulednext-major-releases
Priority: highestnormal
Severity: majornormal

comment:18 by Ryan J Ollos, 5 years ago

#11947 closed as a duplicate.

comment:19 by Ryan J Ollos, 3 years ago

TODO Add documentation when implemented, see TracWorkflow@72.

See also 0.11/TracWorkflow.

comment:20 by Ryan J Ollos, 3 years ago

#11093 and #12908 closed as duplicates.

Last edited 3 years ago by Ryan J Ollos (previous) (diff)

comment:21 by Michael Kriegel, 2 years ago

I am also very interested in this feature!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned. Next status will be 'new'.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.