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

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 Leaders.
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.

Suggest an answer

Log in or Sign up to answer