Forums

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

Scriptrunner - How to update Priority only if custom field is a specific value

Michelle Campbell August 1, 2022

I want to use Scriptrunner to change the Priority of an issue to "High" if a certain custom field is set to a specific value and NOT change the Priority if the custom field is set to any other value.  Any thoughts on the code?  Thanks in advance!

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Champion
August 1, 2022

Hello @Michelle Campbell 

Welcome to the community.

Is there a reason you need to do that specifically with ScriptRunner? You could easily do it with an Automation rule.

Michelle Campbell August 1, 2022

Thanks Trudy.  I didn't know it was possible with Automation.  I'll look into that - maybe it would be easier than Scriptrunner code.  ;-)

Trudy Claspill
Community Champion
August 1, 2022

Automation is generally easier than Scriptrunner code as it is a no-or-low-code solution. Here is an example of a rule you could use:

Trigger: When your custom field is edited

Condition: If your custom field contains value X

Action Edit issue

- Set Field Priority to High

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events