The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Groovy Scripting (JMWE) - OptionID

Ralf Fehling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
February 9, 2026

Hello everyone,
I noticed that a Groovy script is causing errors.

Until now, I have been using issue.get(‘customfield_11802’)?.get(null)?.optionId == 15017.

 

No signature of method: java.lang.String.get() is applicable for argument types: (null) values: [null] Possible solutions: grep(), next(), grep(java.lang.Object), getAt(groovy.lang.EmptyRange), getAt(int), getAt(groovy.lang.Range)

I have currently changed it to issue.get(‘customfield_11802’) != ”Yes, checked“.

I found various methods (getGlobalItemId, option.getOptionId()) on the Internet, but none of them produced the desired result for me.

Do you have a solution for me on how I can read the selected OptionID?

Best Regards
Ralf

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Martin Runge
Community Champion
June 8, 2026

Hi @Ralf Fehling

I guess this is happening, as the issue.get returns a plain java.lang.String (the text value of the option) instead of an Option object. Have you tried the method getRawValue(), which returns the actual Option object for select fields?

If you prefer to bypass the simplified JMWE wrapper and query Jira's native internal custom field value, you could use something like issue.getCustomFieldValue('customfield_11802')?.optionId == 15017.

DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events