Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,456,258
Community Members
 
Community Events
176
Community Groups

Bulk archive or delete release versions

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

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

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

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.

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