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

Getting import error in Script runner

I am trying to use script runner to delete custom field in bulk, but i am getting import issue for all classes in script runner.

Like Unable to import package com.atlassian.jira.issue.CustomFieldManager

Please help me how to resolve this import issue in script runner.

Thanks in advance.

4 answers

Hi White Linen Homes,

Thank you for your question.

I can confirm that the reason that your package import mentioned above will not work inside of ScriptRunner for Jira Cloud is due to the fact the imports you have mentioned are for ScriptRunner for Jira Server and this will not work as Atlassian only provide a Rest API in Jira Cloud and do not provide a Java API in the cloud like they do in Jira Server.

You can see more detailed information on the differences between the cloud and server versions inside of our documentation page located here.

We would recommend reviewing the documentation for ScriptRunner for Jira Cloud which is located here along with the Jira Cloud Rest API Documentation in order to see how the REST API's work in Jira cloud.

I have reviewed the Jira Cloud Rest API for yourself and can confirm that Atlassian does not provide any Rest API's inside of Jira Cloud to delete Custom Fields which means that it will not be possible to achieve your requirement of bulk deleting custom fields with ScriptRunenr for Jira Cloud.

If this response has answered your question can you please mark it as accepted so that other users can see it is correct when searching for similar answers.



Not sure I follow.  Script runner is made for cloud also.

Hana Kučerová Community Leader Nov 04, 2019

Yes, ScriptRunner is available for cloud, but the functionality is limited compared to the server version.

One of the limitations is, that you cannot import atlassian packages, only some basic Java 8 SE classes are available.

Unfortunately, it is not possible to write the same scripts as in Jira server so far.

Ok - but do we need to do import packages in order to bulk delete CFs?

Suggest an answer

Log in or Sign up to answer

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