This template displays the name of the last user who changed the Assignee field if it was ever changed.
If there is nothing to display, the result will be โNoneโ.
Configuration
To use the Last assignee change author template, simply select it from the template grid. Filter by Assignee to find it faster.
Parameters
This template does not require any additional parameter configuration.
Expert mode
If you switch to Expert mode you can see the formula field in the Expression Parser. You can now tweak the expression to create a custom formula field based on this template.
Expression
Jira expression:
issue.changelogs.filter(changelog => changelog.items.some(item => item.fieldId == 'assignee')).map(changelog => changelog.author.displayName)[0] || ""
Details
1. What does the expression do?
This expression finds and displays the name of the last user who changed the Assignee field on a work item. If the Assignee has never been changed, it shows โNoneโ.
2. Step-by-step breakdown
Letโs break it down:
-
issue.changelogs: This refers to the full history of changes (changelogs) made to the work item. -
.filter(changelog => changelog.items.some(item => item.fieldId == 'assignee')): This filters the changelogs to only include those where the Assignee field was changed. It checks each changelog to see if any of its items have afieldIdof 'assignee'. -
.map(changelog => changelog.author.displayName): For each filtered changelog, this extracts the display name of the user who made the change. -
[0]: This selects the first name from the resulting list. In Jira, changelogs are usually ordered from most recent to oldest, so this gives you the last person who changed the Assignee. -
|| "": If there is no such change (i.e., the Assignee was never changed), this returns an empty string.
3. Examples
-
If Alice changed the Assignee last, the expression will display โAliceโ.
-
If the Assignee was never changed, the expression will display โNoneโ.
4. Real-life use cases
-
Audit and tracking: Quickly see who last assigned a work item to someone else, which is useful for accountability or troubleshooting.
-
Reporting: Build dashboards or reports that show the most recent person to change the Assignee for a set of work items.
-
Custom notifications: Trigger notifications or actions based on who last changed the Assignee.