Can I make a script run every time a custom field value is changed without creating a ScriptListener

Nitish Sajwan December 10, 2019

We have a custom filed of single selection type list. We want to run a groovy script which will run if anyone changes its value.

We also don't have option to go with Behavior also because in our script we are fetching profields value. And we are not sure we can access those values when we write the code in behavior. 

1 answer

1 accepted

0 votes
Answer accepted
Ilya Turov
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.
December 11, 2019

why don't you want to create a listener? it sounds like exactly the scenario you need a listener for

Nitish Sajwan December 11, 2019

Because this is a project specific requirement so we don't want to configure it in system level.

Also in consideration of future JIRA scalability & performance (NFR), we don’t want to use web hooks & script listeners for project specific customization in our shared Jira instance   

Ilya Turov
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.
December 11, 2019

well, I guess you can make a separate transition with that field on a screen and then add a postfunction to it with the logic you want, but listeners can be project specific as well, if thats your main concern

Nitish Sajwan December 11, 2019

Can you please guide me in detail how will I make this transition with that field ?

Ilya Turov
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.
December 11, 2019

Basically, you remove that field from issue edit screen and then create a transition from any status to any status with a screen that contains this field

1.png

and then add postfunction to this transition

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events