After a Confluence server migration, the field "Mentioned In" in Jira points to invalid or wrong pageIDs.

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

Summary

After a Confluence server migration, the field "Mentioned In" in Jira points to invalid or wrong pageIDs.

Environment

Jira Data Center

Diagnosis

After migrating Confluence to a new server, Jira Issues present in Confluence pages are correctly pointing to the Jira server, but Jira "Mentioned in" fields are still pointing to the old Confluence server, with the old server PageID and appID.

Cause

The "Mentioned In" field is currently one of the few Jira fields that link Confluence pages through a hardcoded PageID instead of a dynamic link. As the page ID changes when pages are imported to a new Confluence instance, the address becomes invalid.

Solution

1. First, we'll have to map all the original content using the original instance's database

1 2 3 4 5 6 select c.contentid, c.title, s.spacekey from content c join spaces s on s.spaceid = c.spaceid where contenttype = 'PAGE' and c.content_status = 'current' and prevver is NULL;

This will give you the old Page IDs of the pages in the source instance. You can then run the same query on the new Confluence instance to get the new page IDs, and finally, you can link the two by matching the page title and space key.

2. Updating the data in Jira:

Look at the contents of the remotelink table:

1 SELECT * FROM remotelink;

You should get entries like this:

1 2 3 id issueid globalid title summary url iconurl icontitle relationship resolved statusname statusdescription statusiconurl statusicontitle statusiconlink statuscategorykey statuscategorycolorname applicationtype applicationname ----- ------- --------------------------------------------------------- ----- ------- ----------------------------------------------------------------- ------- --------- ------------ -------- ---------- ----------------- ------------- --------------- -------------- ----------------- ----------------------- ------------------------ --------------- 10000 10101 appId=<segments of letters and numbers>&pageId=<pageId> Page (null) http://localhost/.../pages/viewpage.action?pageId=<pageId> (null) (null) mentioned in (null) (null) (null) (null) (null) (null) (null) (null) com.atlassian.confluence Confluence

The globalID column is the key part here and is broken up into an appID which is the application ID from the remote instance - in this case, the old Confluence instance. You can find the new appID by browsing to<confluence-url>/rest/applinks/1.0/manifest.json and obtaining the ID value in that JSON.

Equipped with this data, you can perform a direct database update in JIRA. This will change the appID from the old Confluence server application ID to the new application ID.

1 2 update remotelink SET globalid = replace('old_id', 'new_id') where ID = id_of_link; update remotelink SET globalid = replace('old_page_id', 'new_page_id') where ID = id_of_link;

We would start with a single page in Confluence and a single issue in JIRA first – if the above approach works, we can perform a bulk update.

You can build a list of SQL queries to update theglobalID for Jira and get them to link to the correct Confluence instance and pages.

Updated on February 25, 2025

Still need help?

The Atlassian Community is here for you.