Stand with Ukraine 🇺🇦

Issue Filter — Confluence Cloud Macro

admin

The Issue Filter macro fetches Jira issues using a JQL query and displays them in a styled HTML table within Confluence. It removes /wiki from the base URL, builds a search URL, and retrieves issues via the Jira REST API. For each issue, it fetches detailed data and outputs key information: issue key (with link), summary, custom problem description, status, assignee, and type. The data is shown in a table with five rows per issue

Try for free

User Parameters

jql

JQL filter for issues

Template

<style>
    table {
      width: 100%;
      border-collapse: collapse;
    }
    th, td {
      border: 1px solid #ddd;
      padding: 8px;
      
    }
    th {
      font-weight: bold;
    }
</style>

#set ($baseUrl = $StringUtils.replace($baseUrl,"/wiki",""))
#set ($jql = $parameters.jql)
#set ($issuesUrl = "/rest/api/3/search/jql?jql=${jql}")
#set($issues = $JiraManager.get($issuesUrl))

<table>
  #foreach ( $item in $issues.issues )
    #set($issue=$JiraManager.get("/rest/api/3/issue/${item.id}"))

    <tr>
      <th rowspan="4" style="text-align: center;">
         <a href="${baseUrl}/browse/${issue.key}">$issue.key</th>
      <td>Summary</td>
      <td>$issue.fields.summary</td>
    </tr>
    <tr>
      <td>Status</td>
      <td>$issue.fields.status.name</td>
    </tr>
    <tr>
      <td>Assignee</td>
      <td>$issue.fields.assignee.displayName</td>
    </tr>
    <tr>
      <td>Type</td>
      <td>$issue.fields.issuetype.name</td>
    </tr>
  #end
</table>