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

Project Import does not include Web Links

    XMLWordPrintable

Details

    Description

      Summary

      When importing a project with a web link, it does not preserve the link.

      Environment

      • Mac OS X 10.8.4
      • PostgreSQL 9.1

      Steps to Reproduce

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

      Expected Results

      The Web Link is present.

      Actual Results

      The Web Link is not present.

      Notes

      Raised as a bug as unsure if new feature/improvement or a bug. We don't have any mention of web links in our Restoring a Project from Backup documentation.

      Workaround:

      The API referenced is here:

      This step will performed after the project has been imported in the target source:

      https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/issue-getRemoteIssueLinks

      Basically we'd do a simple get from the target for all the issues in a project:

      GET URLOFSOURCE/rest/api/2/issue/{issueIdOrKey}/remotelink
      
          {
              "id": 10001,
              "self": "http://10.125.88.109:8080/jira730/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": {}
                  }
              }
          }
      
      

      All you need to do is change the URL to the target instance and the call to a post, the JSON doesn't need to be reformated

      POST /rest/api/2/issue/{issueIdOrKey}/remotelink
      
          {
              "id": 10001,
              "self": "http://10.125.88.109:8080/jira730/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": {}
                  }
              }
          }
      
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dcurrie@atlassian.com Dave C
              Votes:
              66 Vote for this issue
              Watchers:
              50 Start watching this issue

              Dates

                Created:
                Updated: