Breadcrumbs

Count sub-tasks

📚

This template displays the number of sub-tasks of the current work item.

Configuration

To use the Count sub-tasks template, simply select it from the template grid. Filter by Sub-task 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

General expression:

%{issue.subtasks.length}

Display as

Number

Formatting style

Default (unformatted)

Details

1. What does the expression do?

The expression counts the number of sub-tasks associated with the current work item and displays that number.

2. Step-by-step breakdown

  • %{issue.subtasks.length}: Refers to the number of sub-tasks of the current work item.

3. Examples

  • If a work item has 3 sub-tasks, the expression will return 3.

  • If a work item has no sub-tasks, the expression will return 0.

4. Real-life use cases

  • Displaying the number of sub-tasks directly on a work item’s detail view, so users can quickly see how many sub-tasks are present.

  • Creating custom reports or dashboards that show how many sub-tasks each work item has, which can help with workload tracking or project management.

  • Filtering or sorting work items based on the number of sub-tasks, for example, to identify work items that may need more attention or are more complex.