Reordering script runner listeners?

Hi Jamie,

I am helping one of my customers to upgrade their JIRA system, including Script Runner. SR is a great tool, and they are using listeners to, among others, create set of subtasks, when a parent is created. However the subtasks must be created in specific order. In version 2.1.16 that they are using currently, everything works fine. However in latest version 3.0.6 the events are triggered randomly. In older version there was an UI that allowed to move the listeners up and down, but in latest version I cannot find this functionality. I was trying to scan through upgrade history but couldn't find any reference to this, neither in documentation. Am I missing anything? Is there another way to enforce the order?

Thanks,

 

Andre 

2 answers

1 accepted

Thanks Renjith, this might be a good solution but my Java skills are pretty rusty. The built-in listener code for creation of subtasks was very convenient. I looked around for some examples of code that I could use to replace the built in functionality, but I wasn't lucky. Ultimately I found a workaround. I removed all the listeners and implemented creation of the subtasks as issue creation post-functions in the workflow. This solved the problem.

May be you need to write a single listener which creates all the sub-tasks, rather than individual listeners - Just a guess.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published 5 hours ago in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

71 views 4 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you