This user macro retrieves a list of Jira issues using JQL and displays their assignee change history in a structured table within Confluence. For each issue, the macro shows a clickable issue key linking to Jira, the issue summary, and a chronological assignee path using user mentions. It leverages Jira’s changelog via the REST API to detect assignment changes, sorts them by creation time, and presents the sequence using '>' notation. If no results match the JQL, it displays a helpful message.
## Search for issue with key, summary, and changelog included
#set ( $issues = $JiraManager.get("/rest/api/3/search/jql?fields=key,summary,assignee&expand=changelog&jql=${parameters.jql}").issues )
## Jira URL is a Confluence baseURL, but w/o "wiki/"
#set ( $jiraURL = $StringUtils.replace($baseUrl, "/wiki", "") )
## Check for empty result
#if(!$issues)
No issues for JQL <code>${parameters.jql}</code></a>
#stop ## End of execution, there is nothing to render
#end
## Note that not all Atlaskit design tokens (example: var(--ds-text, #ffffff)) work in static macros. Check that case by case
<table>
<thead>
<tr>
<th>Issue</th>
<th>Summary</th>
<th>Assignee history</th>
</tr>
</thead>
<tbody>
## Loop through issues
#foreach ( $i in $issues)
<tr>
<td style="white-space: nowrap;"> ## "nowrap" for issue key to be in one line
<a href="${jiraURL}/browse/${i.key}">$i.key</a>
</td>
<td>$i.fields.summary</td>
<td>
#if ( $i.changelog.histories )
## Sort history items by creation date ascending
#set ($sortedHistory = $SortTool.sort($i.changelog.histories, ["created"]))
#foreach ( $h in $sortedHistory )
#foreach ($item in $h.items)
#if ($item.fieldId == "assignee")
#if ($item.from)
<ac:link><ri:user ri:account-id="${item.from}"/></ac:link> →
#else
<span class="aui-lozenge aui-lozenge-subtle">unassigned</span> →
#end
#end
#end
#end
#end
## Current Assignee
#if ($i.fields.assignee)
<ac:link><ri:user ri:account-id="${i.fields.assignee.accountId}"/></ac:link>
#else
<span class="aui-lozenge aui-lozenge-subtle">unassigned</span>
#end
</td>
</tr>
#end
</tbody>
</table>Display issues using a custom JQL filter
Display a list of Confluence pages with a CSV download feature
Show worklogs from Jira issues
Display a list of clickable labels for a specified page tree
Display space details such as type, status, creation date, and links to permissions and calendars
Generate IDs in Base32 format
Display Confluence page edit and view restrictions to provide essential permission details, including users, groups, and inherited access
Use sticky previous/next buttons to navigate through your Confluence page tree in a linear reading order
Display Confluence users filtered by their email addresses
Retrieve and display labels from a specified space