Related Issues — Confluence Cloud Macro
The macro retrieves and displays a list of Jira issues and their related linked issues in a structured table format.
User Parameters
JQL
Use JQL to filter issues (and their relations) you woul like to show
Template
## Making a request and set result into $defects var
#set($defects = $JiraManager.get("/rest/api/3/search/jql?jql=$parameters.jql").issues)
## Create a Issue URL var for linking simplicity
#set($jiraUrl = $StringUtils.replace($baseUrl,"/wiki",""))
#set($issueUrl = "$jiraUrl/browse/")
## Table header
<table class="aui aui-table-list">
<thead>
<tr>
<th>Issue</th>
<th>Related</th>
<th>Issue Type</th>
</tr><tr>
</tr>
</thead><tbody>
## Table body
#foreach ($defect in $defects)
<tr>
<td colspan="2"><img src="$defect.fields.priority.iconUrl" title="$defect.fields.priority.name" height="15px"><a href="$issueUrl$defect.key">$defect.key</a> $defect.fields.summary</td>
<td><img src="$defect.fields.issuetype.iconUrl">$defect.fields.issuetype.name</td>
</tr>
## Internal loop through linked issues
#foreach ($link in $defect.fields.issuelinks)
## skip inwardIssue, show only outwardIssue
#if ( $link.outwardIssue )
<tr>
<td></td>
<td><img src="$link.outwardIssue.fields.priority.iconUrl" title="$link.outwardIssue.fields.priority.name" height="15px"><a href="$issueUrl$link.outwardIssue.key">$link.outwardIssue.key</a> $link.outwardIssue.fields.summary</td>
<td><img src="$link.outwardIssue.fields.issuetype.iconUrl">$link.outwardIssue.fields.issuetype.name</td>
</tr>
#end
#end
#end
## Table footer
</tbody>
</table>Recommended Macros
Based on CQL it shows a table with: Page title, Author, Updated, Status
Display Jira issue comments in a table
List out a table to display the assignee history for Issues by JQL. Shows the following information: Issue Key, Summary, and Assignee history
Display page edit and view restrictions in Confluence to get essential permission details, including users, groups, and inherited access.
Add a configurable tile to a Confluence page
Shows all attachments from the current space in a table view
Display a custom list of recently updated content
Display Confluence users filtered by their email addresses.