Sum up story points and display value in parent work item in Jira Cloud

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

Our aim is to use Jira Automation to:

  • sum up the value of Story Points from all stories linked to an Epic based on their status

  • store the sums from each status in custom fields on the Epic

The end result will allow us to view how many linked Story Points are Done, In Progress, or associated with any other status your project uses.

By using separate status-based custom fields, we gain these benefits:

  • The default Story points field on the Epic can define the Epic's estimate of effort, separate from its linked stories

  • You can quickly view cumulative progress made on linked stories only by viewing the Epic

  • Optional: You can configure a Dashboard to visualize the status of Epics and their linked stories using the Filter Results Gadget

To sum up Story Points within the existing Story Points field on the Epic (without creating additional custom fields), refer to Sum up story points and keep parent and subtask in sync

Solution

Configure custom fields

First, create new custom number type fields to hold the sum of the linked stories' Story Points. Please refer to Create a custom field for instructions.

For our examples, we'll focus on the sum of Story points of linked stories that are in the In Progress and Done statuses. We'll also store the sum of all Story points in a custom field. This will require 3 new custom fields:

  • Story Points of all linked stories in Done

  • Story Points of all linked stories in In Progress

  • Story points of all linked stories (All statuses)

Note:

  • The custom fields need to be associated with the correct project's screens to be visible

  • To ensure the custom fields are only visible on Epics, refer to Configuring custom field contexts

Configure Automation rule(s)

Let's create an example Automation rule to calculate the sum of all stories linked to the Epic whenever a linked Story is created or edited and store the value in the Total Story Points of all linked stories custom field on the Epic.

  1. Visit Project Settings > Automation and select Create rule

  2. Choose the Multiple work item events trigger

  3. Configure the following events:

    1. Issue created

    2. Issue updated

  4. Add a Work item fields condition 

    1. Field issue type should equal Story

  5. Add a JQL condition to prevent the issue from running on stories with no parent Epic

    1. Use the JQL: "parent" != EMPTY

  6. Add the Lookup work items action

    1. This action will reference all Stories under the same parent for our calculation

    2. Use the JQL: "parent" = {{triggerIssue.parent}}

  7. Set up a Branch rule / related work items set to Parent

    1. Within this branch, choose the field that will contain the sum value

    2. For our example, we're updating the "Story Points of all linked stories" custom field

    3. Set the field value to: {{lookupIssues.Story Points.sum}}

  8. Name and publish your rule

In order to update the custom fields for stories in the In Progress or Done statuses, continue editing the Automation rule, repeating steps 4 - 5 above and modifying the query as detailed below. Note, it's possible to also create separate Automation rules for each status, but this is simple enough to also configure in one rule.

JQL for the Lookup work items component for In Progress stories:

"parent" = {{triggerIssue.parent}} AND "status" = "In Progress"

JQL for the Lookup work items component for Done stories:

"parent" = {{triggerIssue.parent}} AND "status" = "Done"

Ensure the correct custom fields in the Edit issues fields components are configured. The value of the field must stay the same: 

{{lookupIssues.Story Points.sum}}

Our example Automation rule will run whenever a linked Story is created or edited. It calculates the sum of all stories, all In Progress stories and all Done stories linked to the Epic. Then, it stores the summed values in the respective custom fields.

Updated on April 21, 2025

Still need help?

The Atlassian Community is here for you.