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

Accepted Answer
0 votes

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
Community showcase
Posted Sep 25, 2018 in Jira

Atlassian Research Workshop opportunity on Sep. 28th in Austin, TX

We're looking for participants for a workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sha...

457 views 7 5
Join discussion

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