Insert a dynamic list of Jira Issues into a Confluence page
Context
While your team is happy with content published from Jira to Confluence thanks to Elements Publish, with all information needed from source, parent or child issues, they also might want to fetch and display a list of issues in a nice table. It is possible using the Jira Issue macro from Confluence in your existing pages.
Problem is: the macro is not dynamic and the JQL request has to be done for each page, manually.
With Elements Publish to Confluence, you can insert the Jira Issue macro directly into a Confluence template or a page using variables. That way, you can display a list of issues based on a dynamic JQL query based on the source of parent issue without outside intervention each time a new page is published.
Tutorial with a Confluence template
In this example, we want to use a specific Confluence template called "ITSM Weekly incident report" to create pages from an issue with the key ITSM-3.
This guide explains how to insert the Jira Issue macro into this Confluence template so that every time the recipe is used, the Jira Issue macro is automatically injected into the Confluence page with the data included in the dynamic JQL query.
Prerequisites
- A recipe called "Incident status" has been created and activated.
- This recipe is configured to create pages in a specific Confluence space, with a specific parent page.
- This recipe has been configured to use "ITSM Weekly incident report" Confluence template.
Configuration steps
1 - As a Jira admin, go to the "Elements Publish to Confluence" administration and click on Recipes in the navigation bar.
2 - In the Recipes listing page, select "Incident status" in the Active Recipes list.
3 - In the Recipe configuration page, click on the Content tab.
4 - Select "Created from Confluence template" in the Creation mode, click the link "Edit template" to open the template editor in Confluence.
The template editor is opened in another tab.
Elements Publish to Confluence uses the same permission scheme defined in Confluence and Jira: in order to open the template editor, the user needs to have the appropriate permissions on the template in Confluence.
5 - In the template editor, select where you want your Jira Issue macro to be injected in the page. Then, use the "+" option to select the "Dynamic list of Jira issues" macro.
6 - In the dialog, enter the JQL query for retrieving the list of issues you want to display on your page.
In our example, we will list the issues "is blocked by" linked to the ITSM ticket raised for the incident.
Start typing your JQL query and choose where you want to insert your dynamic value by selecting the Issue Key from the source issue. Click on "Add to JQL" and specify the link type. At the end, your JQL query looks like issue in linkedIssues("${source.issueKey}", "is blocked by").
7 - You can test your query and verify if it works as intended. You can choose any issue in the list and click on "Test query".
You can click on the link to see the list of issues that will be displayed on your page.
8 - In the "Display options", you can choose the maximum number of issues and the columns that you want to display. By default, all issues are displayed and the columns are Issue key, Issue type, Summary, Status, Assignee and Priority.
9 - Click on the Insert button to insert the macro in your template.
10 - Save the template.
11 - Go back to the recipe configuration and use the Save button to save the changes in the recipe.
Result
With these settings, every time the "Incident status" recipe is triggered from ITSM-3, a page will be created from the Confluence template defined in the recipe.
This page will exactly look like the "ITSM Weekly incident report" template and contain the list of issues defined by the JQL query, in which the values have been replaced by those related to the source issue.
Tutorial with a Confluence page
In this example, we want to create a Confluence page from an issue with the key ITSM-3.
This guide explains how to insert a list of Jira issues into a page so that every time the recipe is used, the Jira Issue macro is automatically injected into the Confluence page with the data included in the dynamic JQL query.
Prerequisites
- A recipe called "Incident status" has been created and activated.
- This recipe is configured to create pages in a specific Confluence space, with a specific parent page.
Configuration steps
1 - As a Jira admin, go to the "Elements Publish to Confluence" administration and click on Recipes in the navigation bar.
2 - In the Recipes listing page, select "Incident status" in the Active Recipes list.
3 - In the Recipe configuration page, click on the Content tab.
4 - Select "Design your own page" in the Creation mode, click the button "Insert Macro" to open the JQL editor.
5 - Configure your JQL query the same way as described with the Dynamic list of issues macro for Confluence templates.
•••
New to Elements Publish?
If this tutorial has stirred your imagination, why not give it a try?
• Try Elements Publish for free •