On Tuesday, July 23, 2013 8:47:01 PM UTC-7, ivanelson wrote:

> I want to execute an external command, after the closing of a Ticket. 
>
> So I tried to make a "plugin" based ITicketChangeListener.
>
> from trac.core import *
>> from trac.ticket.api import ITicketChangeListener
>> class IntegrateTracGLPI(Component):
>>     implements(ITicketChangeListener)
>>     # ITicketChangeListener methods
>>     def ticket_created(self, ticket):
>>         log = open("/tmp/log.txt","a")
>>         log.write("created\a")
>>         log.close()
>>     def ticket_changed(self, ticket, comment, author, old_values):
>>         log = open("/tmp/log.txt","a")
>>         log.write("changed\a")
>>         log.close()
>>   """ Update GLPI Database... """
>>     def ticket_deleted(self, ticket):
>>         pass
>
>
>
> The method "ticket_changed", it is not running.
>
> My plugin is in the directory /var/mytracenv/plugins. And also see the 
> trac.log loaded.
>
> My objective is only to run an external routine. So also accepted the 
> suggestion of some existing in T-H.
>

I'm not spotting what's wrong with your ITicketChangeListener 
implementation, but AdvancedTicketWorkflowPlugin has a run_external 
operation that might be of use to you.

http://trac-hacks.org/wiki/AdvancedTicketWorkflowPlugin

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to