Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,456,049
Community Members
 
Community Events
176
Community Groups

Preserve Custom fields IDs when migrating to Cloud?

When migrating custom fields to Cloud with Atlassians Confluence Cloud Migration Assistant, the custom Field IDs are changed.

We have queries where the Custom field ID has been referenced and not the custom field name, so after migrating those queries no loger reference the correct custom field. Is there any work around for this issue? 





2 answers

Hi @Lise Wåsjø 

Certified Cloud Migration specialist here. I hope I don't blow it up too much but I think you and the Atlassian Community have the right to know that migrations are still painful. You have encountered just the tip of the iceberg. Let's stick to filters: there are a few more issues. Two of the most common issues from my perspective:

  • ID references in JQL will either break or filter for wrong results. Example JQL:
project = 10000 //project ID
cf[10112] is not EMPTY //custom field ID
  • Name references of fields that were duplicated. Example JQL: 
custom_field_name is not EMPTY // where custom_field_name was migrated previously to Cloud

The list is much longer, and if you're planning to perform a migration, you should be aware of it. You can find the list here

Now to a solution to your problem:

As @Hana Kučerová mentioned, there is no easy solution. 

If you're in a pre-Prod migration step: depending on the size of your server instance, you might be able to go through all the filters shared with you in the front end and change the custom field ID reference to an actual custom field name.

But for bigger instances, I suggest a SQL solution:

SELECT id, filtername, authorname, reqcontent, fav_count FROM searchrequest WHERE LOWER(reqcontent) ~ 'cf\[\d.+?]';

This will only show you the filters which will break on Cloud. You can update them in the DB directly (please only if you know what you're doing and in the best case, you have a migration staging environment), or use this shortcut: 

Use the ID column of the SQL result and insert it at the end of the URL in your browser:

http://<JIRA_server_instance>/secure/admin/EditCustomField!default.jspa?id=<ID> 

However, if you're already on Cloud:

For small instances, checking all filters manually might be fine. For larger instances, try this REST API. It might be worth creating a small Python script for it. 

I'm fearing I'm getting too technical so I'll stop here, but should you (or anyone else reading this) wish for more details, hit me up.

Cheers,
Dawid

1 vote
Hana Kučerová Community Leader Jan 20, 2023

Hi @Lise Wåsjø ,

I don’t think there’s any workaround. When the cloud site is created, there are already some custom fields created and these (their IDs) can be in conflict with your server instance. I believe this is the reason custom fields always get the new IDs.

You will probably have to map these queries and change them after the migration :-(.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events