I'm trying to get a checkbox value through ScriptRunner.
My checkbox field has only one option.
I found a similar question and tried the same code. (https://community.atlassian.com/t5/Jira-Core-questions/How-to-get-checkbox-value-with-scriptrunner-in-post-function/qaq-p/278604)
However, it didn't work in my environment. "No such property: value for class: java.lang.object" message appeared in the line of 'customField.getValue(issue)*.value'
def customField = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Additional Access");
def selectedValues = customField.getValue(issue)*.value
if ("Email Required" in selectedValues) {
// Do something
}
Should I add any import modules? I am very new to groovy. I have read lots of posts before about this but can't get it working. I would appreciate your help.
