Remove duplicate Rank fields in Jira server
概要
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.
ソリューション
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.
データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。
Run the following SQL to list down all Rank custom field:
SELECT id, cfname from customfield WHERE customfieldtypekey = 'com.pyxis.greenhopper.jira:gh-lexo-rank';
This will return results such as:
id | cfname -------+-------- 10004 | Rank 10005 | Rank1 (2 row)
Run the following SQL to identify the default Rank custom field:
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.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.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:
JSW-13098 - Getting issue details... STATUS