Skip to main content

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.

GroupMetricCounts
ConversationCommentsThe comments on the work item
ConversationPeople who commentedThe different people who commented
ConversationVotesThe votes
ConversationWatchersThe people watching it
PlanningSprintsThe sprints it has been in, closed ones included
PlanningFix versionsIts fix versions
PlanningAffects versionsIts affects versions
PlanningLabelsIts labels
PlanningComponentsIts components
StructureSub-tasksIts sub-tasks
StructureLinked work itemsLinked work items of any link type
StructureLinked work items of one link typeLinked work items of one link type and direction
Work and filesWork log entriesThe work log entries
Work and filesAttachmentsThe attached files
Work and filesAttachment size (MB)The size of all attached files, in MB with one decimal

Settings​

SettingWhat it doesDefault
What to countThe metric from the table aboveNone, so you pick one
Link type and DirectionFor Linked work items of one link type: which links countNo link type, and Either way
Only work items that aren't doneFor one link type: counts a linked work item until its status is in the Done categoryOff
DisplayA plain number, a traffic light or a progress barPlain 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.

  1. Create the field from the Open blockers recipe, or open the configuration page of a Calculated Metrics field.

  2. In What to count, select Linked work items of one link type.

  3. In Link type, select Blocks, and in Direction, select This item is blocked by ….

  4. 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.