Thanks for your response. I will try to do my own class.
On 4 mai, 23:49, Remy Blank <[email protected]> wrote: > Sandrino Torelli wrote: > > I wan't to know if it is possible to use automatic ticket modification > > like closed, ref, ... but for our private states (test, ...) without > > doing bad hack into the plugin. > > You should be able to inherit from CommitTicketUpdater in a plugin, and > add more commands. For example, to add a "move to testing" command, add > a method cmd_testing() and modify the ticket status in there, and add a > configuration option commands_testing to define words that should > trigger this command. > > Something like (untested): > > class MyUpdater(CommitTicketUpdater): > > commands_testing = Option('ticket', 'updater.testing', > 'validate test', """Words that move a ticket to testing.""") > > def cmd_testing(self, ticket, changeset, perm): > if 'TICKET_MODIFY' in perm: > ticket['status'] = 'testing' > > Then, enable your new plugin (and leave the original updater disabled). > > -- Remy > > signature.asc > < 1 000AfficherTélécharger -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
