ScriptRunner for JIRA Cloud. can not add any import to the script
I try to add the simplest classes. like this, for example
import com.atlassian.jira.component.ComponentAccessor
and get an error
Script1.groovy: 1: unable to resolve class com.atlassian.jira.component.ComponentAccessor @ line 1, column 1. import com.atlassian.jira.component.ComponentAccessor
what the problem. any idea?
Hi Mike,
Thank you for your question.
I can confirm that ScriptRunner for Jira Cloud is different to ScriptRunner Jira Server as Jira Cloud does not provide the Java API which the server version has as Atlassian restrict what functions can be performed on cloud through the Rest API.
This is reason that your Import statement gives an error as this import statement is only valid for the Java API on Jira Server.
More information on the differences between the cloud and server versions can be found in the documentation page located here.
If this answer has solved your issue can you please accept it in order to mark this answer as correct for users who are searching for a similar issue.
Regards,
Kristian
So any script with an import statement cannot work in Cloud version ?
what a loss of power
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi George,
I can confirm that you only use imports provided by the standard Java 8 classes as described in the documentation page here and that as mentioned previously you can only interact with Jira Cloud through the Rest API as Atlassian do not provide the same Java API in Jira Cloud that they do in Jira Server.
Regards,
Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is it possible to bulk delete custom fields using script runner?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.