It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JIRA to Confluence links broken after migration to Cloud

After migrating from Server to Cloud (both  JIRA and Confluence), the running the JIRA Macro Repair fixes the links from Confluence to JIRA, but not from JIRA to Confluence, which continue to point to the server.

Does anyone know the cause and how to fix?

 

4 answers

The solution to this is not too difficult if you understand the data structure of the integration and a bit of scripting experience.

Note you only need to do this if the Page ID's are going to change (e.g. when you import a Space individually).

The easiest way to perform this task is to iterate over the imported Jira Issues like follows - for each Jira Issue imported (e.g. from JQL search):

  1. Get the applicable links from the Jira Issue
  2. For each link:
    1. Ask the 'Original Confluence' instance for the Space Key and Page Name
    2. Using the Space Key and Page Name, ask the 'Target Confluence' instance what the Page ID is for the migrated page
    3. Update the link on the Jira Issue with the new Base URL, Context Path and Page ID.

The following resources should be referenced:

I recommend using Python for this, as it is quick to sketch out the code, I'd say also use the following to simplify the amount of work needed:

  • Jira Python Library
  • Confluence Python Library

If you were migrating Server-to-Server, I would recommend dumping the CONTENT table and saving on authenticating all those REST Requests, but in this sort of case (Cloud), we would leave the script running for hours/days etc. and this would be a 'bleed-over' migration activity, which doesn't block people using the system.

2 votes

Hey Mark, 

The cause is that the XML file that uploads JIRA is still pointing at the old Confluence server. 

We actually just addressed this issue recently when migrating a client from Server to Cloud.

When performing a migration from one Server instance to another, the issue is relatively easy to solve as a simple "find and replace" of the old domain name with the new domain name will suffice. The issue with moving to cloud is that all of the links that point to Confluence are in the form of https://<domainname>/pages/viewpage.action?pageId=<contentID>. When you move to Cloud, all of the ContentID's are rewritten. 

I was able to fix this issue, but it is a pretty technical process. If you aren't comfortable working with shell scripts, the DB and Rest API, fixing the issue is going to be quite challenging. If you're up for it I can attempt to describe the process, but I don't know how well I can explain it in this format. 

Thanks, 

Kian

Hey Kian

 

I faced the same problem, could you please tell me the process?

I'm wondering when the contentID is rewritten then how possible to fix and find the pages in correct order.

 

Best

Saeedeh

Have you already performed the migration? Once it's been done, there isn't a way that I've found to perform the fix. I was told by Atlassian support that they have some steps to perform after an instance has been migrated, but it isn't "technically" support.

Yes, I've done it before but just find out the issue. I opened a support ticket as well but no response yet, I don't know why I had the impression (!!) that the id will be remains the same after migration then didn't check so far. 

Thanks for your response

Yeah, sorry. I discovered the solution after a test instance of ours went sideways on a restore. I don't have any ability to fix it once it's been pushed up.

Same problem here! Jira issues are still linked to the pages on the server instead of the cloud.

Thanks Dario,

That's what I did actually, I raised a support ticket and they helped me through it. It is now working fine.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

We want to hear from you! How do you use Slack and Atlassian together?

Hi Everyone! My name is Mina and I am on Atlassian’s Ecosystems Marketing team. Our team is focused on our technology partnerships and marketplace apps. One of Atlassian’s partners is Slack, who ...

94 views 1 6
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you