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

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)

0 answers

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,811 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot