How to read the option value of a dropdown list (custom field) in Script Listener on Jira Cloud

Pujan Ziaie November 25, 2017

Hello,

I'm trying to use the script listener to read the value of a custom field drop down list and I can't get to the value.

Here is my code:
def variable1 = issue.fields[variable1CfId] as String
And variable1 is a single dropdown list field. How can I get the option value now?
variable1 and variable1.value both return a map:
[self:https://pnw-pmo.atlassian.net/rest/api/2/customFieldOption/10131, value:Yes, id:10131]
I basically need to read "Yes". How can I retrieve it? I cannot access Option object there (import throws exception)

1 answer

0 votes
David Stoner April 18, 2018

Did you ever figure this out? I have a similar issue?

Thanks

Suggest an answer

Log in or Sign up to answer