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

Creating a remote link with application type "com.atlassian.jira" breaks link rendering on UI issue page

      Issue Summary

      When a Remote link is created with the REST API and an application type "com.atlassian.jira" is supplied and the relationship is "relates to", then the Remote Link will not display on the issue page. We just get a spinner and "Failed to load"

      This also happens when a link between a Jira Cloud and Jira Server instance is created via the UI. The link displays correctly in Jira Cloud but appears broken in Jira Server.

      Steps to Reproduce

      1. Create an input file with this JSON:
        {
        
        "application": {
        
        "type": "com.atlassian.jira",
        
        "name": "ACI SCRUM-8"
        
        },
        
        "relationship": "relates to",
        
        "object": {
        
        "url": "http://jira_remote:8087/browse/SCRUM-8",
        
        "title": "SCRUM-8"
        
        }
        
        }
        
      2. Create the remote link using the REST API
        curl -H "X-ExperimentalApi: opt-in" -H "Content-Type: application/json" -u charlie:'charlie' -X POST "http://jira_local:8085/rest/api/2/issue/AL-13/remotelink" -d @input.json
        
      3. The response confirms the remote link as created:
        {"id":10003,"self":"http://jira_local:8085/rest/api/2/issue/AL-13/remotelink/10003"}
        

      Expected Results

      The remote link is rendered on the UI issue page on the local Jira

      Actual Results

      The below exception is thrown in the atlassian-jira.log file:

      2020-06-16 06:21:35,047 https-jsse-nio-8443-exec-25 DEBUG jianue 381x73643x4 1lwew7u 10.5.232.251 /rest/viewIssue/1/remoteIssueLink/render/36202 [c.a.j.p.v.issuelink.rest.RemoteIssueLinkResource] Successfully retrieved the remote issue link '36202'
      2020-06-16 06:21:35,047 https-jsse-nio-8443-exec-25 ERROR jianue 381x73643x4 1lwew7u 10.5.232.251 /rest/viewIssue/1/remoteIssueLink/render/36202 [c.a.j.p.v.issuelink.rest.RemoteIssueLinkResource] Error occurred while generating final HTML for remote issue link: java.lang.NullPointerException
      

      No http request is sent to the remote Jira to fetch anything either.

      Workaround

      Unless the application type is specifically needed, the "type: com.atlassian.jira" line can simply be removed the JSON used to create the link and it will render just fine.

            [JRASERVER-71437] Creating a remote link with application type "com.atlassian.jira" breaks link rendering on UI issue page

            Any case for the cloud instance?

            If I remove this in scripts for Jira cloud <> cloud - it just add as weblink

            Piyush A (STR) added a comment - Any case for the cloud instance? If I remove this in scripts for Jira cloud <> cloud - it just add as weblink

            Thank you very much for this workaround!

            Constance Hua added a comment - Thank you very much for this workaround!

            Alexander Weickmann added a comment - - edited

            Creating an issue link between a Jira Cloud and Jira Server instance via the UI:

            • Jira Cloud renders the link nicely with status
            • Jira Server renders the link in broken way as described in the issue description

            So the Jira Server link rendering is not only broken via REST API, but also if you use the normal way of creating the link via the UI. Maybe this might increase the priority of this bug ...

            Alexander Weickmann added a comment - - edited Creating an issue link between a Jira Cloud and Jira Server instance via the UI: Jira Cloud renders the link nicely with status Jira Server renders the link in broken way as described in the issue description So the Jira Server link rendering is not only broken via REST API, but also if you use the normal way of creating the link via the UI. Maybe this might increase the priority of this bug ...

              Unassigned Unassigned
              mkarlsson Magnus Karlsson
              Affected customers:
              10 This affects my team
              Watchers:
              13 Start watching this issue

                Created:
                Updated: