Edgewall Software
Modify

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#9753 closed enhancement (wontfix)

CommitTicketUpdater should have an option to specify action

Reported by: Marcus Lindblom <macke@…> Owned by:
Priority: normal Milestone:
Component: ticket system Version: 0.12
Severity: normal Keywords: CommitTicketUpdater
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

We don't close tickets with commits, we mark them as fixed so they can be tested.

It's a simple replacement of the action/state on line 249 that could be fetched from the TracIni config.

Attachments (0)

Change History (3)

comment:1 by Remy Blank, 14 years ago

Resolution: wontfix
Status: newclosed

We can't possibly handle all possible situations in that component, as there are just too many possibilities. That's why we made the CommitTicketUpdater component so that it can easily be subclassed to provide your own implementation of actions (in this case, override cmd_close()).

This can be done in a single-file plugin placed in the plugins folder of the environment. Something like (untested):

from tracopt.ticket.commit_updater import CommitTicketUpdater

class CommitUpdater(CommitTicketUpdater):
    def cmd_close(self, ticket, changeset, perm):
        if not self.check_perms or 'TICKET_MODIFY' in perm:
            ticket['status'] = 'fixed'

The single-file plugin will be activated automatically, and you should make sure to disable the original CommitTicketUpdater.

comment:2 by Marcus Lindblom <macke@…>, 14 years ago

Ok. Fully understandable! :)

I think can code something like that, and see if it can go on trac-hacks.org eventually.

Thanks for pointing me in the right direction!

comment:3 by plittle@…, 14 years ago

Just commenting that this is a really nice way to make the builtin stuff extensible. Bookmarking for reference.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


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