Uploaded image for project: 'Automation for Cloud'
  1. Automation for Cloud
  2. AUTO-1802

Publish Confluence page action with issue summary in Jira automation breaks the text formatting

XMLWordPrintable

    • 1
    • Minor

      Issue Summary

      Publishing Confluence page action with issue summary in Jira automation breaks the text formatting of the issue description

      Steps to Reproduce

      1. Create a Jira automation with a trigger like Create Work Item
      2. Add an action "Publish new page in Confluence" and
      3. In this action, use issue.description smart value in the Page content.
      4. Run the rule by creating a work item.

      Expected Results

      Text formatting in the Issue description should be the same in the Confluence page created by automation.

      Actual Results

      Text formatting is broken on the Confluence page. Comparison of Jira Issue description and Confluence page formatting below:
             

      Workaround

      Use the send web request action to create a page with the Create Page Confluence API. The text formatting should be maintained on the Confluence page. 

      Use the below format in Custom Data(API call Body), to include the Issue summary in page:

      {
        "spaceId": "spaceid",
        "status": "current",
        "title": "string",
        "body": {
          "representation": "storage",
          "value":"{{issue.description.html.jsonEncode}}"
        }
      } 

      Update the spaceId value with space id for the space where you wish to create the page.

       You can get the spaceids for spaces using this API call: https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space/#api-spaces-get

      Example URL to get spaceid using a space key:
      https://yoursite.atlassian.net/wiki/api/v2/spaces?keys=<space key>

              Unassigned Unassigned
              c89c89c091e7 Avinash Bisht
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: