Archiving certain Jira project versions fail and a retry error is thrown in the UI

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

The project versions and their release details can be viewed from either the Project Settings > Versions page or from the Releases option in the left pane of the project page. While trying to archive some releases, the action fails and a Retry error shows in the UI as illustrated below:

(Auto-migrated image: description temporarily unavailable)

Clicking on Retry does not provide any new UI or errors and stays in the same state. The end users can instead delete the version and assign the issues belonging to the version to another version.

Environment

Jira Server/Data Center on any version from 8.20.0.

Diagnosis

If a HAR file is generated while trying to archive the version, we should see the error "A version with this name already exists in this project" in the response of the PUT requests sent by the browser to the end point /rest/api/2/version/<VERSION_ID>:

(Auto-migrated image: description temporarily unavailable)

When checking the content of the projectversion table in the Jira database for a specific project, we can notice duplicate version names for the same project:

  • Example of SQL query (replace <PROJECT_KEY> with the key of the project from which you cannot archive the version:

    1 select * from projectversion where project in (select id from project where pkey = '<PROJECT_KEY>');
  • Example of result (we can see that the version "Version 3.0" is duplicated in the Jira database, and has 2 IDs: 10101 and 10003):

    1 2 3 4 5 6 7 id | project | vname | description | sequence | released | archived | url | startdate | releasedate -------+---------+-------------+--------------------+----------+----------+----------+-----+-----------+---------------------------- 10000 | 10000 | Version 1.0 | | 1 | true | | | | 2022-12-15 03:48:51.971-06 10001 | 10000 | Version 2.0 | | 2 | | true | | | 2022-12-29 00:00:00-06 10002 | 10000 | Version 4.0 | | 3 | | true | | | 10101 | 10000 | version 3.0 | | 4 | | | | | 10003 | 10000 | Version 3.0 | Cloned for testing | 5 | | | | |

Cause

Usually, the project versions page should not allow duplicate version name to be entered from the UI and should throw the error "Version of such name already exists." as illustrated below:

(Auto-migrated image: description temporarily unavailable)

However, under some conditions, versions with duplicate names might be accidentally created for a given project. This can happen:

  • During a refresh of the Jira application and depending on which method is used to perform this refresh

  • When versions are cloned from a 3rd party plugins

  • When bulk edits went wrong

This results in duplicate versions that are not released or archived to show up in the releases and versions page. While they can be deleted from the versions page under project settings, they cannot be archived and the Retry error will be shown in the UI.

Solution

Solution 1 - Via the Jira UI

  • Go to the Project Settings > Versions page

  • Select any instance of the version that is duplicated (ideally, select the one which has no or very few issues associated to it by hovering over the Progress bar):

    (Auto-migrated image: description temporarily unavailable)
  • Select ... > Delete Delete' under the Actions column next to the version you selected. You would get to select the version to which you can move the current issues associated with the version to be deleted (you can select the other version that has the same name in the Assign them to this version dropdown):

    (Auto-migrated image: description temporarily unavailable)

Solution 2 - Via the Jira REST API

You can also utilize the Jira REST API end point PUT /rest/api/2/version/{id}/mergeto/{moveIssuesTo} to merge the duplicate versions.

Below is a example of merging the duplicate version 3.0 (ID:10003) that is a duplicate of the original version 3.0 (ID:10101):

1 curl -v -u <user>:<pass> -X PUT -H "Content-Type: application/json" <domainurl>/rest/api/2/version/10003/mergeto/10101

Updated on March 18, 2025

Still need help?

The Atlassian Community is here for you.