Confluence has been updated to version 6.15.9

Back to  nodeHelper


getOption(Issue issue,String customFieldName, String optionName)
getOption(Issue issue, Long customFieldId, String optionName)

Allows retrieving an option from a single select list custom field with the help of custom field name or ID. 

Introduced in0.8

Example use

def moodOption = nodeHelper.getOption(issue, "Mood", replica.customKeys.mood) 
issue.customFields."Mood".value = moodOption

Using the custom Field Id instead of the custom field name 

Set the received value from the remote select list custom field to the local custom field with ID 10201

// When you use field id add L at the end of the Id. E.g. 10201L is custom field id with L added at the end.
issue.customFields."10201".value = nodeHelper.getOption(issue, 10201L, replica.customFields."Remote Select List CF Id".value.value)


  • Options are available only for custom fields with values such as a select list, radio button or checkbox.

When you use .value in a script, you'll get all option-related data 

issue.customFields."Mood".value==`[[id:10, value:Happy], [id:11, value:Sneezy]]`
When you use .value.value you'll get only the option value without additional data
issue.customFields."Mood".value.value==`[Happy, Sneezy]`

See Also


Back to  nodeHelper