Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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
4,467,457
Community Members
 
Community Events
177
Community Groups

Jira ScriptRunner: is there any way to allow only one execution of the listener script at a moment?

Edited

Hello everybody,

I am working on a ScriptRunner listener script. This listener is executed on “Issue Created” event, and based on some search criteria it adds that issue’s description as a comment to a matched issue (if found), and finally deletes the redundant issue. This listener works fine when I manually test it in my dev cloud instance. 

 

However, in the  production environment, issue basically gets created from incoming emails from another source. When the system receives multiple emails concurrently, the listener script starts multiple executions in parallel, and the final result does not match with the expected.

 

Is there any way to instruct the listener script to complete the ongoing execution before starting the next execution?

 

Thanks.

1 answer

1 accepted

0 votes
Answer accepted

Hi @Nazmus Sadat 

Thank you for your question.

This means that as Jira is Asynchronous that one script could complete before another script as the API's of one script could return before the other script is completed and this means that it is not possible to have scripts that depend on another script having completed first with ScriptRunner for Jira Cloud.

Meaning, you cannot specify the order script listener in as they are fired as when we received the webhook event that triggers them off of Atlassian. 

I hope this information helps.

Thank you. 

Kind Regards

Kate

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events