Hi,
I recently started using scriptrunner for JIRA although it seems I've fallen at the first hurdle.
In order to access the value of a field in a given JIRA issue it's my understanding that the "ComponentAccessor" class is required. Unfortunately I'm unable to import it and output a field value to the logs.
The script has one line:
import com.atlassian.jira.component.ComponentAccessor
Output:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script1.groovy: 1: unable to resolve class com.atlassian.jira.component.ComponentAccessor @ line 1, column 1. import com.atlassian.jira.component.ComponentAccessor ^ 1 error at com.adaptavist.sr.cloud.workflow.AbstractScript.parseScript(AbstractScript.groovy:51) at com.adaptavist.sr.cloud.workflow.AbstractScript.evaluate(AbstractScript.groovy:32) at com.adaptavist.sr.cloud.workflow.AbstractScript$evaluate$2.callCurrent(Unknown Source) at com.adaptavist.sr.cloud.events.ScriptExecution.run(ScriptExecution.groovy:27) at ConsoleScriptExecution1_groovyProxy.run(Unknown Source)
I'm using JIRA cloud, if you require any further information please let me know.