How To Fix Duplicate Rank Values For a Rank Field

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

One or more of the below symptoms may apply to Jira (also called Jira Agile):

  • Ranking operations are not possible.
  • The balance job is never completed.

Diagnosis

If using JIRA Software (JIRA Agile) 6.7.0 or higher, use the Understand the LexoRank managment page in Jira server tool to run an integrity check. Otherwise, access <JIRA_BASE_URL>/rest/greenhopper/1.0/lexorank/integrity - for example https://jira.atlassian.com/rest/greenhopper/1.0/lexorank/integrity. You must be an admin to run this.

(info) It may help to copy/paste the results into something like jsonprettyprint.com as it will make it easier to read.

If the rank integrity checker doesn't pass on Duplicate Ranks Check, this KB will apply.

        ....
		{
          "name": "Duplicate ranks check",
          "description": "Checks if there are any duplicate rank values for a rank field.",
          "passed": false,
          "failureReason": "Detected duplicate ranks for rank field 15201 : {0|11t9b4:=2, 0|11sqnc:=2, 0|11suow:=2, 0|11tm0w:=2, 0|11thk8:=2, 0|11spog:=2, 0|11tes0:=2, 0|11sx00:=2, 0|11t2qg:=2, 0|11sqx4:=2, 0|11tde8:=2, 0|11t9zc:=2, 0|11sxcw:=2, 0|11ssi0:=2, 0|11teqo:=2, 0|11tlm0:=2, 0|11t140:=2, 0|11tbp4:=2, 0|11tg5s:=2, 0|11srhs:=2, 0|11t03s:=2, 0|11t4bc:=2, 0|11taow:=2, 0|11td48:=2}",
          "fatal": false
        },
		....

Resolution

  • There is a REST endpoint that can be accessed, which will automatically heal the duplicate records.
  • This must be run as a System Administrator, which is defined in one of the groups as per Managing Global Permissions.
  • The endpoint requires a PUT, which is not something a browser can do without an additional plugin.
  • A PUT can also be done by executing it on the command line using cURL.

Option 1 - Postman app

  1. Install Postman app.
  2. Load it up and put in the URL <JIRA_BASE_URL>/rest/greenhopper/1.0/lexorank/duplicates, for example https://jira.atlassian.com/rest/greenhopper/1.0/lexorank/duplicates.
  3. Ensure the Content Type is set to JSON, otherwise errors will occur.
  4. Set the request type to PUT.
    The screenshot below illustrates the configuration.
  5. Submit the command and then run the Integrity Check again.

Option 2 - Command Line

(warning) This requires cURL to be installed. The installation is platform-specific, and can be downloaded from http://curl.haxx.se/download.html.

Run the below, replacing admin:password with the appropriate administrative user and their password, and populating <JIRA_BASE_URL> appropriately.

curl -X PUT <JIRA_BASE_URL>/rest/greenhopper/1.0/lexorank/duplicates -u admin:password

(warning)  Please note that the "FAILURE" in the UI may not clear immediately per JSWSERVER-21305.

Last modified on Apr 29, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.