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.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Sam Ferguson ,
I found this https://mraddon.blog/2017/12/01/how-to-archive-the-old-releases-in-jira-of-all-projects-at-same-time/
Hope it helps.
Thanks
Lava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.