Script runner query for making a field mandatory based on Resolution value in Jira cloud

Sruthi Kumaran October 11, 2023

Hi All,

Please help to develop Script runner query for making a field mandatory based on Resolution value like "Done" in Jira cloud.

Use case :

If Resolution is Done , I want to make a custom field mandatory and for any other value its should be optional.

1 answer

0 votes
John Tester November 6, 2023

@Sruthi Kumaran 

I did this recently setting it as a condition on the a transition to Closed and should get you in the right direction.

We wanted Sprint to be optional upon an issue transitioning to Closed if the Resolution was either Canceled or Duplicate.

 

(issue.customfield_10033 != null && issue.resolution?.name != "Canceled" || issue.resolution?.name == "Canceled")
||
(issue.customfield_10033 != null && issue.resolution?.name != "Duplicate" || issue.resolution?.name == "Duplicate")

Hope this helps,

John

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events