Create a Macro in Confluence via rule in Jira

Sebastian Seidel March 18, 2024

Hello dear community,
I would like to create a Confluence page when creating an issue via a rule in Jira. This works without any problems. On this page, there should be a macro that provides an overview of underlying issues. I have created the macro in Confluence and now inserted the code into the web request without success (Response 500). The JQL command retrieves all associated epics as well as the underlying tasks.

What am I doing wrong when inserting the macro?

Best regards
Sebastian

The Request:

{
    "type": "page",
    "title": "Page title",
    "ancestors": [{"id": 123456}],
    "space": {"key": "ABCD"},
    "body": {
        "storage": {
            "value": "<p>Page for the topic. </p>
                      <ac:structured-macro ac:name=\"jira\">
                      <ac:parameter ac:name=\"server\">Instance 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=\"maximumIssues\">20</ac:parameter>
<ac:parameter ac:name=\"jqlQuery\">(issue in linkedIssues( {{issue.key.jsonEncode}} ) OR 'Epic Link' in linkedIssues( {{issue.key.jsonEncode}} ))</ac:parameter>
<ac:parameter ac:name=\"serverId\">012345678910</ac:parameter>
</ac:structured-macro>",
            "representation": "storage"
        }
    }
}

 

0 answers

Suggest an answer

Log in or Sign up to answer