Run bash script on ticket creation

14 views
Skip to first unread message

Angelo

unread,
Jan 18, 2021, 11:37:18 AM1/18/21
to Trac Users

Hi guys,

I need to run a custom bash script when a ticket gets created, is there a way to achive this behavoiur using the default Trac's features or a custom plugin?
Alternatively could it be fine also perfom an http call with custom parameters and authentication header.

Many thanks in adavance.

Regards,
Angelo.

RjOllos

unread,
Jan 18, 2021, 11:42:10 AM1/18/21
to Trac Users
You could make a plugin that calls the script using ITicketChangeListener:

If you need to call your script at specific actions of the Trac workflow, see run_external operation of TracAdvancedTicketWorkflow:

You might be able to use the latter on ticket creation by adding:
create.operations = run_exernal
and adding create.py to $env/hooks with create.py calling your script using the subprocess module.

Ryan 
Reply all
Reply to author
Forward
0 new messages