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
atlassian, jira product discovery, product operations, product ops, linkedin live, atlassian events, cross-functional collaboration, product management, engineering collaboration, design collaboration, atlassian learning, agile teams, product strategy

Product Ops Unpacked: 4️⃣ tips every product pro needs to know ✍️

Join PM Evangelist, Axel Sooriah, & Product Ops. Consultant & Advisor, Jenny Wanger, as they unpack the role of product ops and discuss key takeaways in Atlassian’s ‘The Product Ops Mission’ guide. They’ll answer your questions live on May 6 at 9:00am PT.

Register here ⬇️
AUG Leaders

Atlassian Community Events