Reordering script runner listeners?

AK November 29, 2014

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

0 votes
Answer accepted
AK December 1, 2014

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.

1 vote
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 30, 2014

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