Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-70190

Cloud to Server Import will show existing mentions with AccountID rather than name

    XMLWordPrintable

Details

    • 8.04
    • 91
    • Severity 2 - Major
    • 19
    • Hide
      Atlassian Update – 10 Mar 2020

      Hi everyone,

      We solved this issue by providing a dedicated app - Cloud Compatibility for Jira available at Atlassian Marketplace. You will need to install it directly from your Jira Server instance by going to "Jira Administration" > "Manage apps" > "Find new apps", search for "Cloud Compatibility for Jira" or ask your Jira Server admin to install it for you. This app is compatible with Jira Server 8.

      Please bear in mind that this app is listed as "Unsupported". Please visit Atlassian Supported Apps for further details. You can always ask a question in the Atlassian Community in case you have any issues.

      Thank you,

      Pawel Cegla
      Jira Server Bug Fix Team

      Show
      Atlassian Update – 10 Mar 2020 Hi everyone, We solved this issue by providing a dedicated app - Cloud Compatibility for Jira available at Atlassian Marketplace . You will need to install it directly from your Jira Server instance by going to "Jira Administration" > "Manage apps" > "Find new apps", search for "Cloud Compatibility for Jira" or ask your Jira Server admin to install it for you. This app is compatible with Jira Server 8. Please bear in mind that this app is listed as "Unsupported". Please visit Atlassian Supported Apps for further details. You can always ask a question in the Atlassian Community in case you have any issues. Thank you, Pawel Cegla Jira Server Bug Fix Team

    Description

      Issue Summary

      Existing mentions are shown with AccountID after backup is imported into Jira Server from Cloud.

      Environment

      Jira 8.4.1

      Steps to Reproduce

      1. Mention a user in Jira Cloud, you should see their name on the mention once you save the comment.
      2. Generate a backup for Server and restore this to a Server instance
      3. Check the same issue you mentioned previously in Cloud

      Expected Results

      The Users name still present on the issue

      Actual Results

      The AccountID is shown instead:

      Notes

      Workaround

      This should give you a list of update queries to run, we recommend testing this in a lower enviornment and as always backing up the DB before running anything

      PostgreSQL:

      SELECT ('UPDATE jiraaction SET actionbody = replace(actionbody, ''accountid:' || cu.external_id || ''', ''' || cu.lower_user_name || ''') WHERE actionbody LIKE ''%[~accountid:' || cu.external_id || ']%'';') as "Queries to fix" FROM cwd_user cu WHERE cu.external_id IS NOT NULL; 

      MySQL:

      SELECT (CONCAT('UPDATE jiraaction SET actionbody = replace(actionbody, ''accountid:' , ifnull(cu.external_id, '') , ''', ''' , ifnull(cu.lower_user_name, '') , ''') WHERE actionbody LIKE ''%[~accountid:' , ifnull(cu.external_id, '') , ']%'';')) as "Queries to fix" FROM cwd_user cu WHERE cu.external_id IS NOT NULL; 

      Workaround 2

      We noticed that if you desire to change the email accounts of users, the queries above would fail to migrate the mentions correctly.
      For the migration to be successful, we need to update the "actionbody" column with the "user_name" value and then change the email account of the user:

      1. Use the query below to generate the updates:
        --QUERIES FOR POSTGRES
        SELECT ('UPDATE jiraaction SET actionbody = replace(actionbody, ''accountid:' || cu.external_id || ''', ''' || cu.user_name || ''') WHERE actionbody LIKE ''%[~accountid:' || cu.external_id || ']%'';') as "Queries to fix" FROM cwd_user cu WHERE cu.external_id IS NOT NULL;
      2. Run the generated queries.
      3. Update the user's email accounts.

      Attachments

        Issue Links

          Activity

            People

              pcegla Pawel Cegla
              mriza Mohamed Riza (Inactive)
              Votes:
              19 Vote for this issue
              Watchers:
              48 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: