JIRA: Scriptrunner custom listener: do they run outside the main thread that raised the event?

Ajay Upadhyaya February 27, 2019

Hi,

I've a question about how the scriptrunner listeners are implemented. Here is the background for the use case - 

We've implemented a custom listener that executes on Issue Updated event. In the listener, we are adding some users to the issue's watchers list, conditionally. Whats happening is, in one Jira instance the newly added watchers are receiving the issue update email notification for the same update event which caused them to get added as watcher (user wasn't a watcher before this update), while in a different Jira instance, they are not receiving. Of course, once they are added as watcher, the subsequent updates do send the notification to them. 

I'm not clear about how the listeners are executed. 

Could someone clarify the sequence of execution for

a. Jira sending issue update email, and

b. Scriptrunner listener running on Issue Update event),

and whether these are executed in same or different threads / transactions?

We are looking into possibility that issue we are having may be related to the timing (or thread or transaction) when Jira sends the update notification and when the script listener runs. 

Thanks  

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events