Hello, Jira's built-in single select picker does not support both value and label properties so I am attempting to use ScriptRunner's Custom Picker (https://docs.adaptavist.com/sr4js/latest/features/script-fields/built-in-script-fields/custom-picker) to create a very simple select that does this, however I am having some trouble because all examples use either an API or a DB connection to populate the list of options.
Perhaps this is not even the right way to approach this issue, suggestions?
I am not very familiar with Groovy but here is pseudo-code of what I am trying to accomplish:
import com.onresolve.scriptrunner.canned.jira.fields.model.PickerOption
def options = [
{class: 'Foo', description: 'Bar'},
{class: 'Baz', description: 'Qux'},
{class: 'Quux', description: 'Corge'},
]
toOption = { Map<String, String> map, Closure<String> highlight ->
new PickerOption(
value: map.class,
label: map.description,
html: highlight(map.description, false),
)
}