Forums

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

Scriptrunner: How to restrict RESOLUTION values based on SELECT cf Value?

Sami
Contributor
August 14, 2021

Hello there,

I am seeking a sample code to restrict the RESOLUTION field values based on the SELECT LIST custom field. 

Custom Field Name: Subcategory

Anyone please provide a sample scriptrunner code?

 

 

Regards

Sami.

1 answer

1 accepted

1 vote
Answer accepted
Brittany Wispell
Community Champion
August 15, 2021

Hey @Sami 

I believe this might be close to what you are looking for. 

import static com.atlassian.jira.issue.IssueFieldConstants.RESOLUTION 

if (getActionName() == "Terminate") {    
  getFieldById(RESOLUTION).setFieldOptions(["Won't Fix", "Incomplete", "Cannot Reproduce"])
}

 

You can find more information here: Restricting Priority and Resolution 

You can also search the Adaptavist Library.

Please let me know if you run into any issues. 

Thanks,
Brittany

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.18.1
TAGS
AUG Leaders

Atlassian Community Events