Breadcrumbs

Sum Story points in linked Epic

📚

This template displays the sum of the selected story point field from all work items within the epic linked to the current work item.

This includes the item itself, except if it is an epic. Then, all of its child items will be considered for the calculation instead.

Sub-tasks are not considered for the calculation.

If no such items are found, “None” will be displayed.

For the parameter Story points, select the field that represents story points in your instance.

Configuration

To use the Sum Story points in linked Epic template, simply select it from the template grid. Filter by Epic to find it faster.

Parameters

To complete the configuration, select values for all parameters.

grafik-20250602-085950.png

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:

%{sum(fieldValue({issue.cfNNNNN}, issuesUnderEpic()))}

Replace the ID with the one of your 'Story Points' custom field.

Display as

Number

Formatting style

Default (unformatted)

Used parser functions

The links lead to the JWTC documentation because the parser functions are shared functionalities.

Details

1. What does the expression do?

The expression calculates the total of story points or another numeric field value from all work items that are part of the same epic as the current work item. If the current work item is an epic, it sums the story points of all its child work items. Sub-tasks are not included in this calculation.

2. Step-by-step breakdown

Let’s break it down:

  • cfNNNNN: This is a placeholder for your numeric custom field ID. You need to replace NNNNN with the actual ID used in your Jira instance if you configure this expression manually.

  • issuesUnderEpic(): This function returns all work items that are linked to the same epic as the current work item. If the current item is an epic, it returns all its child work items.

  • fieldValue({issue.cfNNNNN}, issuesUnderEpic()): This retrieves the value of the field for each work item returned by issuesUnderEpic().

  • sum(...): This function adds up all the values retrieved in the previous step.

3. Examples

Suppose you have an epic with three child work items:

  • Work item A: 3 story points

  • Work item B: 5 story points

  • Work item C: 2 story points

If you use this expression on the epic, it will sum 3 + 5 + 2 = 10.

If you use it on Work item A (which is linked to the epic), it will also sum the story points of all work items in the same epic (including itself), resulting in 10.

4. Real-life use cases

  • Displaying the total story points for all work items in an epic on a dashboard or report.

  • Automatically calculating the total effort required for an epic, helping teams with sprint planning and progress tracking.

  • Creating custom fields in Jira that show the sum of story points for all work items under a specific epic, making it easier for project managers to monitor workload distribution.