How To Fix Duplicate Rank Values For a Rank Field
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
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.
*Fisheye および Crucible は除く
症状
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.
診断
<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.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
},
....
ソリューション
- 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
- Install Postman app.
- 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. - Ensure the Content Type is set to
JSON
, otherwise errors will occur. - Set the request type to
PUT.
The screenshot below illustrates the configuration. - Submit the command and then run the Integrity Check again.
Option 2 - Command Line
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
Please note that the "FAILURE" in the UI may not clear immediately per JSWSERVER-21305.