How do you combine/merge multiple custom fields into one field?

When we initially switched to Jira, we imported issues from bugzilla.  As part of this (I wasn't involved), it created a custom field per project, each one labelled the same as External issue ID.  So now, when ever we are doing anything with field configurations, we have 10's of these seemingly identical fields in the list.  Is there a way to collapse these fields into one field – I presume that there will never be a conflict in the actual database, as each one is only populated at all in a single project.

 More generally, the question is can we merge the contents of multiple custom fields into one field.

2 answers

I don't think that merging the values can be achieved without modifying the database directly OR using a script (groovy for example) and since I see you added cloud to the tags of the question I don't think you can do this.

I think the only option would be to :

  1. export your cloud instance and import it to a server installation
  2. Modify the data - merging the fields via SQL or Groovy Script
  3. Create a backup of this temporary server instance and import back to cloud

I would recommend doing the field merge via the JIRA API and not the database directly and the way it could work is:

  1. Create new field which have a context for each project or 1 global context and name it for example NEW External Issue ID
  2. Write a plugin or groovy script that copies the value from External issue ID to NEW EXTERNAL ISSUE ID
  3. Delete the all the old fields


Actually there might be a much simpler solution to that - take a look at the issue export/import to/from Excel - I think you can achieve the same as with script

  1. Create new field
  2. Export all the issues
  3. Rename the old field column to the new field
  4. Remove all other columns
  5. Import the excel, so it updates all your issues and sets the value of the new field to the value of the old field.
  6. Then just remove all old fields.

Aaand this should work for cloud without needing to go through a temporary server installation

My question is similar.  We have custom fields we need to combine into one field

eg. {Field 1+Field 2+Field 3} = Field 4

eg. {Division +Region+Site} = Development

Please note I have minimal scripting knowledge at this time so if I could get an example to customize I would really be grateful.


Jen, were you able to figure this out? I am also trying to accomplish the same thing.

Peter DeWitt Community Champion Oct 02, 2017

@Jen Hamilton@Hassan Hashmi, Not sure if you guys ever figured this out but check out Misc Custom Fields add-on.  Unfortunately its not supported but it is free and should allow the combination of multiple text fields into another field.

@Jen Hamilton @Hassan Hashmi @Peter DeWitt

You can bulk change the issues and remove the old ones.
1, Create the new option in your costume field
2, Create query for the matching costume fields
(eg.: project = myProject AND "MyCostumeField" = "Division" )
3, on the query screen under tools you can find bulk change
4, remove the old "Division" option from the custom field.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Wednesday in Jira

Make your Atlassian Cloud products more secure: our NEW admin security guide

Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...

139 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you