Merge data of two custom fields into one

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

 

The steps in this article have the potential to irrevocably change issue data within Jira. As such, we recommend that you create a backup of your data before attempting any changes. 

Summary

This article describes potentials solutions to merge data of two custom fields into one.

Environment

Jira Cloud

Problem

There are situations when Jira admins have two fields and they want to merge the data present in these fields to one custom field so that the other can be deleted.

Use case

After a Server to Cloud migration, you ended up with duplicated (migrated) fields.

For example, there are 2 fields Field_A and Field_A (migrated). Field_A (migrated) was in use earlier (before a Server to Cloud migration) and Field_A is being used now. The end goal is to merge the data of Field_A (migrated) to Field_A and, ultimately, delete Field_A (migrated).

Solution

There are several ways to do this. Among them:

Through import-export:

  1. Export all the Jira issues from your instance to a CSV (keep the search filters blank to see all issues in the search option and then export the filtered result in a CSV).
  2. In the downloaded CSV file, delete all the columns except the issue key, Field_A, and Field_A (migrated).
  3. Move (cut-paste) the data from the Field_A (migrated) column to the Field_A column so that there is no data in the Field_A (migrated) column. This step will replace all existing data in Field_A. Please use spreadsheet functions to merge data from both columns if you need to save existing data from Field_A and append data from Field_A (migrated) to it.
  4. Import the CSV file.

Once done, the data in the Field_A (migrated) field should become empty for all issues, and the Field_A field will contain the data from the Field_A (migrated) field. You can then delete the Field_A (migrated) field.

Using Automation:

  1. Create an automation rule.
  2. Select the trigger type of Scheduled.
  3. Add a conditional to check to see if Field_A (migrated) IS NOT EMPTY (this is optional in some cases, but can help to avoid running this rule on issues that have no value for that field)
  4. Add a conditional to check to see if Field_A IS EMPTY (again this is optional, but it can help to avoid overwriting existing data in Field_A)
  5. Use the Edit issue action.
  6. Select the Field_A field as the field that needs to be set.
  7. Select the three dots(more) > Copy from > then select Current issue & Field_A (migrated) from the dropdown.
  8. Save the rule > enter a name > Turn on the rule. 

Once done, the automation rule will run at the scheduled time and will copy the data of the Field_A (migrated) field to the Field_A field of all the issues. Once done, you may delete the Field_A (migrated) field.


Last modified on Jul 22, 2024

Was this helpful?

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