Remove duplicate Rank fields in Jira server
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
Overview
In JIRA Agile, it is possible to create multiple LexoRank fields to manage the backlog. In case there a decision to remove those additional Rank fields, the steps below can be followed.
Resolution
It's possible to skip straight to points 5 & 6, 1 - 4 are there to identify any filters that may be using the rank field that's going to be deleted.
Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.
Run the following SQL to list down all Rank custom field:
1
SELECT id, cfname from customfield WHERE customfieldtypekey = 'com.pyxis.greenhopper.jira:gh-lexo-rank';
This will return results such as:
1 2 3 4 5
id | cfname -------+-------- 10004 | Rank 10005 | Rank1 (2 row)
Run the following SQL to identify the default Rank custom field:
1
SELECT propertyvalue FROM propertyentry LEFT JOIN propertynumber ON propertyentry.ID = propertynumber.ID WHERE property_key = 'GreenHopper.LexoRank.Default.customfield.id';
This returns the below, which verifies that the
Rank1
custom field is not the default.1 2 3 4
propertyvalue --------------- 10004 (1 row)
Run the following SQL to identify existing filters using the duplicated rank field (in this case, Rank1). Remember to replace
Rank1
with the appropriate Custom Field Name and10005
with the id from step 1.1
SELECT id, filtername, authorname FROM searchrequest WHERE reqcontent LIKE '%Rank1%' OR reqcontent like '%cf[10005]%';
Inform the user (authorname) to update their existing filter to use the default Rank field.
Unlock the rank custom field, as per Unlock a locked Jira Software Server or Data Center custom field.
Delete the rank custom field by navigating through (
Administration > Issues > Custom Fields
) .
Please note that deleting the duplicate field may not remove the rank values. Please see the workaround section of the following bug for more information:
JSWSERVER-13098 JIRA Agile doesn't delete rank from table when the Custom Field was deleted
Was this helpful?