Create Confluence page with links to issues

Use case

Create a Confluece page with macros to display issues from a Jira instance after transitioning an issue. The issues for the macros can be obtained from the transitioned issue or from a JQL query.

Prerequisites

Establish a connection between the Jira and Confluece on premise instances.

🛠️ Configuration

Add the Execute remote action post function to the transition of your choice.

Switch to Expert mode on the right side menu of the page.

Action*

Select the Create a page remote action template for Confluence on premise.

Connection*

Choose a connection to the Confluence instance if it exists. If not, create a new one based on the example for a Confluence on premise instance.

Customize your action

Update the Action body field with the following expression:

{
    "title": "Confluence page for %{issue.key}",
    "type": "page",
    "space": {
        "key": "DS"
    },
    "body" : {"storage":
    {"value":"
    <p>Link to the Issue: <ac:structured-macro ac:name='jira' ac:schema-version='1' ac:macro-id='cd527206-2486-4b42-8ffd-14d4489fd717'><ac:parameter ac:name='server'>Your Company 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'>9f2d636e-c842-3388-8a66-17c1b951dd45</ac:parameter><ac:parameter ac:name='key'>%{issue.key}</ac:parameter></ac:structured-macro></p>
<p><br /></p>
<p><strong>More issues in the project: </strong></p>
<p><ac:structured-macro ac:name='jira' ac:schema-version='1' ac:macro-id='b21fb7a7-f663-426a-b3d9-759f2be81ae8'><ac:parameter ac:name='server'>Your Company 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'>project = %{issue.project.key} </ac:parameter><ac:parameter ac:name='serverId'>9f2d636e-c842-3388-8a66-17c1b951dd45</ac:parameter></ac:structured-macro></p> ",
    "representation":"storage"}
    }
}

Make sure that you replace the Confluence space key in the Action body to the appropriate one before testing the post function. Using an incorrect or nonexistent space key would prevent the creation of the page.

This Action body is used to create a page with two different macros in a space with DS key. The first macro displays a link to the Jira issue that created the page and the second one to the issues in the same Jira project as the transitioned issue.

The second macro can be modified to run under a different JQL query by changing the query project = %{issue.project.key} in the expression with the desired one.

Use case Workflow function Parser functions
Get attributes of Assets objects

Execute remote action

Create Confluence page with links to issues

Execute remote action

Automatically log work on a Jira issue

Execute remote action

dateTimeToString()

Create an overview page for a software release

Execute remote action

Clone issue in external instance

Execute remote action

Create a component to group issues related to UI design

Execute remote action

Notify the reporter of an issue about its status by a Telegram message

Execute remote action

Set the assignee of an external issue same as the transitioned issue

Execute remote action


Transition an external Jira ticket based on the linked internal one

Execute remote action


Create a comment on an external Jira ticket

Execute remote action

Automatically link an issue to an external one

Execute remote action

Create a personal space for a new employee

Execute remote action

Get Hubspot contact information

Execute remote action

Link a Jira issue with the corresponding release ticket

Execute remote action

Get Checklist

Execute remote action

Create a new employee account during an onboarding process

Execute remote action

Read the information from a Trello card

Execute remote action

Set Checklist

Execute remote action

Create an external project for a new employee during an onboarding process

Execute remote action

Automatically create a version when starting the release

Execute remote action

Translate the description

Execute remote action

replaceAll() wikiToHTML() htmlToTxt()

Retrieve the assets of an issue in Jira cloud

Execute remote action