Percentage of resolved child work items

📚

This template displays the percentage of work items under an epic or a standard work item that have a resolution.

Configuration

To use this template, simply select it from the template grid. Filter by Portfolio roll-ups & delivery KPIs to find it faster.

Parameters

This template does not require any additional parameter configuration.

Edit formula mode

If you click on Edit formula 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

General expression:

let children = (issue.isEpic ? issue.stories : issue.childIssues);children.length ? (children.filter(child => child.resolution).length / children.length * 100) : null || null

Display as

Number

Formatting style

Custom pattern

Pattern

Use the following pattern to return actual percentages, e.g. 75 %.

### %

Details

1. What does the expression do?

This expression calculates the percentage of child work items (such as stories under an epic, or sub-tasks under a standard work item) that have a resolution set. In other words, it shows what portion of the child work items are considered "resolved" out of the total number of child work items.


2. Step-by-step breakdown

The expression is:

let children = (issue.isEpic ? issue.stories : issue.childIssues);
children.length ? (children.filter(child => child.resolution).length / children.length * 100) : null || null

Let's break it down:

  • let children = (issue.isEpic ? issue.stories : issue.childIssues);

    • This line checks if the current work item is an epic (issue.isEpic).

    • If it is an epic, it uses issue.stories (the stories under the epic) as the list of children.

    • If it is not an epic, it uses issue.childIssues (the sub-tasks or child work items) as the list of children.

    • The result is stored in the variable children.

  • children.length ? (...) : null

    • This checks if there are any child work items (children.length).

    • If there are no children, it returns null (meaning no percentage can be calculated).

  • children.filter(child => child.resolution).length

    • This filters the list of children to only those that have a resolution set (i.e., are resolved).

    • .length gives the number of resolved child work items.

  • (children.filter(child => child.resolution).length / children.length * 100)

    • This divides the number of resolved children by the total number of children, then multiplies by 100 to get a percentage.

  • : null || null

    • If there are no children, or if the calculation cannot be performed, the result is null.


3. Examples

  • If an epic has 4 stories, and 3 of them are resolved, the expression will return 75 (meaning 75% of the stories are resolved).

  • If a standard work item has 2 sub-tasks, and neither is resolved, the expression will return 0.

  • If there are no child work items, the expression will return null (no percentage can be calculated).


4. Real-life use cases

  • Progress tracking: Product managers or team leads can use this field to quickly see what percentage of an epic's stories or a work item's sub-tasks are resolved, helping to track progress at a glance.

  • Reporting: This percentage can be displayed in dashboards or reports to show the completion rate of work items within larger initiatives.

  • Quality checks: Teams can use this metric to ensure that all child work items are resolved before closing an epic or parent work item.