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

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

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:

1 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:

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

ℹ️ Replace <custom field id in database> with the appropriate value for the custom field you wish to merge.

ℹ️ Please run the Integrity Checker (Administration tab -> Integrity Checker).

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.