-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Low
-
None
-
Affects Version/s: 9.12.0, 10.1.0
-
Component/s: Documentation - All
-
9.12
-
1
-
Severity 3 - Minor
Issue Summary
The MSSQL query in Migrating from Jira Cloud to Data Center applications has an additional '[]' in the query that needs to be removed.
This is reproducible on Data Center: yes
Steps to Reproduce
- Restore a Cloud backup as per Migrating from Jira Cloud to Data Center applications into a Jira instance on MSSQL. This backup should contain an issue that has a comment with a user mention.
- Follow the steps until the 8th step and run the MSSQL query.
- The query should return at least a row like this one.
Queries to fix | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ UPDATE dbo.jiraaction SET actionbody = CAST(REPLACE(CAST(actionbody as NVarchar(MAX)), 'accountid:557057:7232319f-866a-4703-be79-9ca7b1fe45d8', 'admin') AS NText) WHERE actionbody LIKE '%[[]~accountid:557057:7232319f-866a-4703-be79-9ca7b1fe45d8]%'; |
- Run the UPDATE query that was returned as the result.
Expected Results
At least 1 row is updated
Actual Results
0 row is updated because the condition in the query is not met
Workaround
Update the MSSQL query in the documentation to the following
SELECT (((((('UPDATE jiraschema.jiraaction SET actionbody = CAST(REPLACE(CAST(actionbody as NVarchar(MAX)), ''accountid:' + cast(cu.external_id as varchar(max))) + ''', ''') + cast(cu.lower_user_name as varchar(max))) + ''') AS NText) WHERE actionbody LIKE ''%[~accountid:') + cast(cu.external_id as varchar(max))) + ']%'';') [Queries to fix] FROM jiraschema.cwd_user cu WHERE cu.external_id IS NOT NULL;