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

Project Import does not import Remote Links (Web Links)

XMLWordPrintable

      Actual behavior:

      When importing a issues from a Jira instance A into a Jira instance B using any of the method listed below, if there's an Application Link cross linking issues, the Remote Links (=Web Links) are not carried over to the target Jira instance:

      Steps to reproduce:

      1. Create a new project.
      2. Create an issue in that project.
      3. Web Link it to something
      4. Create an XML backup.
      5. Delete the issue.
      6. Project Import that backup, overwriting the project.
      7. Access the issue.

      Expected behavior:

      Have the remote links imported into the instance.

      Actual behavior:

      The remote links are not imported.

      Workaround:

      The workaround consists in using the Jira REST API to get the remote links from the source instance and import them into the targer instance:

      • Run the following API command on the source Jira instance for all issues you need to copy the remote links for. Make sure to replace <SOURCE_JIRA_BASE_URL> with the Base URL of the source Jira instance and <issueIdOrKey> with the Jira issue key (from the UI) or issue ID (from the Database):
        GET <SOURCE_JIRA_BASE_URL>/rest/issue/{issueIdOrKey}/remotelink
        
        • Here's an example of the JSON returned:
          {
             "id":10001,
             "self":"<SOURCE_JIRA_BASE_URL>/rest/api/2/issue/KRIS-11/remotelink/10001",
             "application":{
                
             },
             "object":{
                "url":"https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/issue-getRemoteIssueLinks",
                "title":"test",
                "icon":{
                   "url16x16":"https://docs.atlassian.com/favicon.ico"
                },
                "status":{
                   "icon":{
                      
                   }
                }
             }
          }
          
      • Take the body of that JSON and post it to the Target instance using this call. Make sure to replace <TARGET_JIRA_BASE_URL> with the Base URL of the target Jira instance and <issueIdOrKey> with the Jira issue key (from the UI) or issue ID (from the Database):
        POST <TARGET_JIRA_BASE_URL>/rest/issue/{issueIdOrKey}/remotelink
        

       You might consider writing a script that will bulk execute these API calls.

       

              Unassigned Unassigned
              pcora Pedro Cora
              Votes:
              111 Vote for this issue
              Watchers:
              91 Start watching this issue

                Created:
                Updated: