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.
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.
Hi @White Linen Homes ,
according to these articles, it is not possible, when you are using Jira Cloud:
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.
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