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

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>
            "representation": "storage"


1 answer

0 votes
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 25, 2024

Hi @Sebastian Seidel 

did you try to remove the .jsonEncode from your issue key in the jql? I once did a similar automation rule with creating a jql macro in confluence. It just does the jql without opening and closing paranthese and without .jsonEncode 


Suggest an answer

Log in or Sign up to answer