Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-68699

Create or update a page with Jira Issue Macro by using REST API or SOAP API call will result in missing "mentioned in" link on the Jira side.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 7.4.11, 7.12.5
    • Integrations - Jira
    • None

    Description

      Issue Summary

      Create or update a page with Jira Issue Macro by using REST API or SOAP API call will result in missing "mentioned in" link on the Jira side.

      Steps to Reproduce

      1. Create or update the page with REST API. Use storage format that has correct values for Jira issue macro:
        <p><ac:structured-macro ac:name="jira" ac:schema-version="1" ac:macro-id="b6396288-a0e0-4669-a2f1-4b9fae9714ab"><ac:parameter ac:name="server">JIRA</ac:parameter><ac:parameter ac:name="columnIds">issuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution</ac:parameter><ac:parameter ac:name="columns">key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution</ac:parameter><ac:parameter ac:name="serverId">de8309d4-ca60-3cfe-93b3-af7d2b541ebe</ac:parameter><ac:parameter ac:name="key">TEST-50</ac:parameter></ac:structured-macro></p>
        
      2. Check on Jira side if the "mentioned in" link is created.

      Expected Results

      Link is created.

      Actual Results

      Link is not created.

      Workaround

      Execute another REST API call on the Jira side to update the links.

      • We need a POST request to <jira_base_url>/rest/api/latest/issue/<jira_issue_id>/remotelink In my case "jira_issue_id" was TEST-65.
      • Payload or body needs to have this:
        {
          "application": {
            "name": "Confluence",
            "type": "com.atlassian.confluence"
          },
          "globalId": "appId=1bfdce92-4913-368a-bf61-6f8ecc5ecb5b&pageId=2621447",
          "relationship": "mentioned in",
          "object": {
            "title": "Page",
            "url": "http://localhost:27122/c7122/pages/viewpage.action?pageId=2621447"
          }
        }
        
        • The "1bfdce92-4913-368a-bf61-6f8ecc5ecb5b" is the application link id, that can be retrieved from the URL of the edit page
          of that application link in Jira.
        • We have Confluence pageid in 2 places with 2621447
        • And lastly, we have a Confluence link with "http://localhost:27122/c7122/pages/viewpage.action?pageId=".
          This request should create a "mentioned in" link to the correct Confluence page after we have updated the Confluence page with JIM.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              gpaunovic g
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: