Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Take Jira ticket data and run custom script after the ticket is solved

Hi Community,

I have a case and I am not sure how to handle it. 

we want to run a custom script for each ticket in a one specific project. The custom script should be executed after the ticket closed. The custom script should take the data from the particular ticket and forward the information to a other tool (Datadog). The Datadog part is not the issue. How can I implement a custom script for each ticket with the triggered status of done and get the data from this ticket? 

Hope you understand my behaviour

1 answer

0 votes

Hi @Ioannis Benetos ,

welcome to the Atlassian community!

If you need to execute something custom after a ticket closure, you can setup a custom post function in your close transition.

Post function is something that happens after the transition so, in my opinion, is the best way to do that. You can use ScriptRunner for JIRA ( to implement a scripted post function.

Another way is to setup a batch procedure that retrieve all closed tickets and perform your code for each issue.

Hope this helps,


Hi @Fabio Racobaldo _Herzum_  Thanks for the quick reply! okay and how I get the data from the ticket to use them ? I want to pick the data and forward them to a other tool

A post function has direct access to the issue object against which the transition is being run, so you don't have to write code to ask questions of the issue.

In other words, you can write a post-function that does things like

def email-subject = "Hey, we updated " + issue.getKey() + " " + issue.getSummary()

Like # people like this

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events