Broken or outdated issue weblinks in Jira
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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 changing Jira's base URL, the issues' web links that pointed to the modified base URL will not update and will still point to the old value.
Environment
Jira 7.x and 8.x versions
Diagnosis
1) Navigate to Issues > Select any issue with a WebLink pointing to the updated base URL
2) The Weblink points to the old base URL
Cause
The base URL update does not update the records in the remotelink
table.
Solution
Manually update the records via on the remotelink
table.
You should always take a full database backup before making any direct modifications to Jira's database. This will ensure that you can perform a restore to a known good state should anything go awry.
Please follow best practices for Change Management and test and validate these settings in a Test/Development and Staging environment prior to rolling any changes into a Production environment. This is to validate these changes and ensure that they will function well within your infrastructure prior to placing these changes in production.
Select all entries pointing to the old base URL:
select * from remotelink where url like '%old url%';
Use the replace function to replace the old base URL with the new value. Replace is a function based on string match, thus this is only going to update the URL portion specified inside quotes.
update remotelink set url = replace(url,'oldurl','newurl');
For MS SQL Server, it's necessary to use CAST:
update remotelink set URL = CAST(REPLACE(CAST(URL as NVarchar(MAX)),'oldurl','newurl') AS NText);
- Refer to our Changing Jira base URL KB for other hard-coded URLs that might need to be updated.