How to Convert a Multi-Select Custom Field into Labels
To migrate a multi-select field into the new labels
listing,
- Make a copy of the database (a full SQL dump.)
- Put the backup into a new database and do the following to the COPY:
ALTER TABLE `label` CHANGE `ID` `ID` int(10) NOT NULL auto_increment; ALTER TABLE label AUTO_INCREMENT = X;
INSERT INTO label (FIELDID, ISSUE, LABEL) SELECT DISTINCT NULL AS FIELDID, ISSUE, STRINGVALUE AS LABEL FROM customfieldvalue WHERE CUSTOMFIELD = Y;
customfield
table. - Export all of the rows as inserts from the resulting select:
SELECT * FROM label WHERE ID > X ORDER BY ID
- With the original JIRA database, run the generated insert statements.
- In the SEQUENCE_VALUE_ITEM table, look for the row with SEQ_NAME = "Label". In that row, you must alter SEQ_ID to whatever is the new highest ID in your label table rounded up to the nearest 10. (e.g. if you label table had a highest ID of 104, you should put 110 into SEQ_ID.)
- Restart JIRA
- Rebuild JIRA cache
Last modified on Feb 26, 2016
Powered by Confluence and Scroll Viewport.