This template displays the number of times that the Assignee field had its value emptied or changed to another assignee in the current work item.
Configuration
To use the Count assignee changes 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')).length
Display as
Number
Formatting style
Default (unformatted)
Details
1. What does the expression do?
This expression counts how many times the assignee of a work item has been changed or cleared. In other words, it tells you the total number of times the "Assignee" field was updated in the work item's history.
2. Step-by-step breakdown
Let’s break it down:
-
issue.changelogs: This refers to the complete change history (changelogs) of the current work item. Each changelog entry represents a set of changes made at a specific time. -
.filter(changelog => ...): This filters the changelog entries, keeping only those where the assignee field was changed. -
changelog.items: Each changelog entry contains a list of items, where each item represents a single field that was changed in that update. -
.some(item => item.fieldId == 'assignee'): This checks if any of the changed fields in that changelog entry is the "assignee" field. -
The filter keeps only those changelog entries where the assignee was changed.
-
.length: This counts the number of changelog entries that passed the filter, i.e., the number of times the assignee was changed.
3. Examples
-
If a work item was assigned to Alice, then to Bob, then cleared (set to no one), and finally assigned to Carol, the expression would count 3 changes (Alice → Bob, Bob → none, none → Carol).
-
If the assignee was never changed, the result would be 0.
4. Real-life use cases
-
Audit and reporting: Track how often work items are reassigned, which can help identify bottlenecks or frequent handovers.
-
Team workload analysis: See if certain work items are being passed around too much, indicating unclear ownership.
-
Process improvement: Monitor if work items are often unassigned, which might signal process gaps or delays.