Calculated Metrics
A Calculated Metrics field counts one thing on each work item, such as its comments, watchers, sprints or open blockers.
The count is a number, so you can sort, filter and build dashboards on it with JQL.
What you seeβ
On the work item, you see the number. Some metrics add a short line under it:
-
Attachment size (MB) reads like
14.2 MB, with the number of files under it. -
Sprints says how often the work item was carried over, when it has been in more than one sprint.
-
Linked work items of one link type lists up to three keys of the linked work items, and how many more.
Lists show the number, with MB for attachment size. Search, sorting and exports use the stored number.
What you can countβ
You pick one metric in What to count. The list groups them as follows.
| Group | Metric | Counts |
|---|---|---|
| Conversation | Comments | The comments on the work item |
| Conversation | People who commented | The different people who commented |
| Conversation | Votes | The votes |
| Conversation | Watchers | The people watching it |
| Planning | Sprints | The sprints it has been in, closed ones included |
| Planning | Fix versions | Its fix versions |
| Planning | Affects versions | Its affects versions |
| Planning | Labels | Its labels |
| Planning | Components | Its components |
| Structure | Sub-tasks | Its sub-tasks |
| Structure | Linked work items | Linked work items of any link type |
| Structure | Linked work items of one link type | Linked work items of one link type and direction |
| Work and files | Work log entries | The work log entries |
| Work and files | Attachments | The attached files |
| Work and files | Attachment size (MB) | The size of all attached files, in MB with one decimal |
Settingsβ
| Setting | What it does | Default |
|---|---|---|
| What to count | The metric from the table above | None, so you pick one |
| Link type and Direction | For Linked work items of one link type: which links count | No link type, and Either way |
| Only work items that aren't done | For one link type: counts a linked work item until its status is in the Done category | Off |
| Display | A plain number, a traffic light or a progress bar | Plain number |
The In short: line under the settings says what the field counts.
Example: open blockersβ
You want to see how many unfinished work items block each work item.
-
Create the field from the Open blockers recipe, or open the configuration page of a Calculated Metrics field.
-
In What to count, select Linked work items of one link type.
-
In Link type, select Blocks, and in Direction, select This item is blocked by β¦.
-
Select Only work items that aren't done, and select Save.
Result: A work item blocked by two open work items shows 2. When one blocker is done, it shows 1.
Search with JQLβ
JQL compares the stored number.
To find open work with unfinished blockers, most blocked first, use:
"Open blockers" > 0 AND statusCategory != Done ORDER BY "Open blockers" DESC
To find work carried over more than twice, use:
"Sprint count" > 2 ORDER BY "Sprint count" DESC
When the value updatesβ
FieldCraft recalculates the field when the work item changes in a way that affects the metric.
With Only work items that aren't done, the count also follows status changes of the linked work items.
Jira sends no event for new watchers or votes. Those counts update when you open the work item, at most every 15 minutes, or when you recalculate existing work items.
Things to knowβ
-
Sprints needs your site's Sprint field. Without one, the page warns you and you can't save.
-
People who commented reads up to 1,000 comments per work item.
-
For attachment size, 1 MB is 1,048,576 bytes.
Relatedβ
-
Find work that keeps coming back: combine counts to spot rework and carry-over.
-
Rollup: total a number over the children of a work item.
-
Show a traffic light or progress bar: color the count by thresholds.
-
Field recipes: ready-made counts, such as Comment count and Sprint count.