It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

lost the import of classes in the cloud

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?

1 answer

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

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

Is it possible to bulk delete custom fields using script runner?

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

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 ...

303 views 1 3
Join discussion

Community Events

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

Events near you