Merging Labels into the Default 'Labels' Field After 4.2 Upgrade

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

The functionality provided by 'JIRA Labels Plugin' is embedded in JIRA 4.2+. When upgrading from versions prior to 4.2, labels created by the old plugin may be imported/upgraded using their previous field name (i.e., 'tags').

Cause

When importing an XML backup from previous versions of JIRA which used the labels plugin, the old labels will be imported into the new default 'Labels' field if and only if the custom field in which they reside is called 'Labels.' This is the intended behavior of the upgrade. However, some may wish to merge their custom labels field data into the new system labels field.

Resolution

After upgrading your JIRA instance to 4.2 or later, run the following SQL query and then restart your JIRA instance:

UPDATE label SET fieldid = NULL;

This query will reassign all of the values from the previous label fieldid to the new default Labels field. Any records in the label table without a fieldid will default to the the system Labels field. Knowing this, one may wish for some old labels to be merged and not others--based on the custom field they were previously related to. For example:

UPDATE label SET fieldid = NULL WHERE fieldid = '<custom field id in database>';

(info) Replace <custom field id in database> with the appropriate value for the custom field you wish to merge.
(info) Please run the Integrity Checker (Administration tab -> Integrity Checker).

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Last modified on Feb 26, 2016

Was this helpful?

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