ScriptRunner for JIRA Cloud. can not add any import to the script
I try to add the simplest classes. like this, for example
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?
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.
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.
Learn how to use two new reports for next-gen projects in Jira Cloud: Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events