How to get a string value from a drop down custom field (Groovy Scripted Field)

Puján Z
Contributor
July 18, 2018

Hi,

How can I read the value of a drop-down custom field in Groovy on Jira Cloud? For now I'm using split token which is quite retarded:

 

def myDropDownList = issue.fields[myDropDownListCfId] as String
String[] tokens = myDropDownList.split("[,: ]");
String myDropDownListOptionValue = tokens[5];

 

I'm sure there is a better way! ;)

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events