Return the sum of the original estimates of the work items under the epic's parent in hours only in the epic's parent view.
Configuration
To use the Sum original estimates under parent template, simply select it from the template grid. Filter by KPI 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.issueType} = "Initiative" ? sum(append(fieldValue({issue.originalEstimate}, union(issuesFromJQL("issuekey in portfolioChildIssuesOf("+%{issue.key}+")"), issuesUnderEpic(issuesFromJQL("issuekey in portfolioChildIssuesOf("+ %{issue.key} +")")))), [0] )) / 60 : null}
“Initiative” is a sample name for the parent’s work type. Replace it with a custom one if needed.
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?
This expression calculates the sum of the original time estimates for all work items that are under the parent of an epic (for example, an "Initiative" work item). The result is shown in hours, but only when viewing the parent work item.
2. Step-by-step breakdown
Let’s break it down:
-
%{issue.issueType} = "Initiative" ? ... : null-
This checks if the current work item is of type "Initiative". If it is, the calculation runs; if not, it returns nothing (null).
-
-
issuesFromJQL("issuekey in portfolioChildIssuesOf("+%{issue.key}+")")-
Uses JQL (Jira Query Language) to get all child work items of the Initiative.
-
-
issuesUnderEpic(...)-
For each child, finds all work items under any epic that is a child of the Initiative.
-
-
union(...)-
Combines the list of direct children and all work items under their epics, removing duplicates.
-
-
fieldValue({issue.originalEstimate}, ...)-
Gets the "original estimate" field value for each work item in the combined list.
-
-
append(..., [0])-
Ensures that if there are no estimates, a zero is included to prevent errors.
-
-
sum(...)-
Adds up all the original estimates.
-
-
/ 60-
Converts the total from minutes (the default Jira unit) to hours.
-
3. Examples
-
If you are viewing an Initiative called "Website Redesign", and it has two epics under it, each with several work items (stories, tasks), the expression will sum up the original estimates for all those work items.
-
If the Initiative has no child work items, the result will be 0.
4. Real-life use cases
-
Portfolio Management: A project manager wants to see the total estimated effort (in hours) for all work items under a strategic Initiative, including all epics and their children, to track resource allocation.
-
Reporting: When generating reports for upper management, you can display the total estimated hours for each Initiative, helping with forecasting and planning.
-
Capacity Planning: Before starting a new Initiative, you can quickly see the total estimated workload to ensure it fits within available team capacity.