Bulk archive or delete release versions

Sam Ferguson August 15, 2019

We recently started using JIRA Fix Versions to track releases. However, due to legacy automation that is no longer used, there are over 3,000 meaningless unreleased versions in our JIRA project.

Instead of going through and individually archiving or deleting each of these releases, is there a way to make a bulk update?

Creating a new project is not an option.

I am using Jira Cloud and have access to Scriptrunner.

4 answers

1 accepted

0 votes
Answer accepted
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 20, 2019

Hi Sam,

Thank you for your question.

I can confirm that the reason that the solution above will not work inside of ScriptRunner for Jira Cloud is due to the fact the code you have provided is for ScriptRunner for Jira Server and this will not work as Atlassian only provides a rest API in Jira Cloud and does 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.

I can confirm that Atlassian does not provide a rest API to bulk delete or archive versions but do provide the Delete Version API which you can use to delete the version or the Update Version API which you can use to update a version and to set it to archived in order to archive it.

You will be able to use this API to write a script where you can define a list which contains the ids for each version that you want to update and then to loop through each version and to update it to either delete it or archive it using the APIs specified above. 

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.

Regards,

Kristian

Sam Ferguson August 21, 2019

Thank you Kristian.

I wound up manually closing the versions as I did not see your answer until now. However, it looks like the Delete or Update Version endpoints would have been a more effective solution.

Sam

0 votes
Justin Liu December 1, 2022

For anyone still looking for solution for this, I have created a Github Action which can integrated to your CI and create the jira release as archived

for my case we automatically create jira release each time we build our app, and now the new builds (jira releases) are automatically created as archived and no longer need to worry about spend hours archiving them...

 

Github Action link: 

https://github.com/marketplace/actions/jira-release-archive-action

0 votes
Roey Shamir December 24, 2019

Hi, you are more than welcome to try my plugin for free - Version Manager for JIRA cloud.

Not only does it let you easily delete / archive selected versions, but it also lets you delegate the manage versions permission to whoever you decide and assign components to versions.

0 votes
Lava Kumar Dukanam _Appfire_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 15, 2019
Sam Ferguson August 15, 2019

Thank you for the quick response Lava.

Unfortunately, this solution requires importing versionManager, and I don't believe you can use imports with the JIRA Cloud version of Scriptrunner.

Do you know if there is a workaround to use a similar script in JIRA cloud?

Suggest an answer

Log in or Sign up to answer