The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Best practices while using multiple scriptrunner scripts in single transition

harsha nambiar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 22, 2019

What is the best practice if we have multiple functions to be called in jira transition?

Do we create multiple customised post functions or do we do all the changes in one single post function.

Does it affect performance if we use multiple post functions? 

 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Nic Brough -Adaptavist-
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 Champions.
October 23, 2019

There is a very tiny overhead in using many scripts, as Jira has to handle each as a separate post-function.

But, you will usually find multiple ones easier to write, understand, and maintain as requirements change.

So, I would look at each requirement and group them by what they are for.  If, for example, you have three related fields to update in a transition for say audit reasons, keep them together in one script.  But if the purposes are unrelated (say one is for audit, one is for a testing update and a third a poke to another system), keep them separate.