I've attempted to use the code listed in this closed thread:
https://community.atlassian.com/t5/Answers-Developer-Questions/Looking-for-a-script-to-fill-customfield-multiple-checkboxes-in/qaq-p/543685
Modified as such to use the actual name of my custom field:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.customfields.option.Option
import com.atlassian.jira.issue.fields.CustomField
CustomField customField = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Value Statement Impact")
StringBuilder stringBuilder = new StringBuilder()
((List<Option>) issue.getCustomFieldValue(customField)).each {
stringBuilder.append(it.getValue()).append(", ")
}
return stringBuilder.toString()
However, I am getting the following error when doing so:
The script could not be compiled: <pre>org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script5.groovy: 9: expecting ')', found 'issue' @ line 9, column 24. ((List<Option>) issue.getCustomFieldValue(customField)).each { ^ 1 error </pre>.
Can someone comment as to where I may have made an error in my copy/paste of the code?
Thanks,
Jeff