Automation to sum up story points of Stories in different statuses and add the value to the parent
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Summary
This article describes how to create an Automation Rule using Jira Automation in order to
- sum up the value of the Story Points field from all stories linked to an Epic that are in a specific status (Done, In progress, etc.)
- store the individual sums in custom fields on the Epic.
To sum up the value of the Story Points field from all the stories linked to an Epic within the existing Story Points field on the Epic, refer to Sum up story points and keep parent and subtask in sync
The solution described in this article enables the following benefits:
- You can utilize the default Story points field on the Epic to define the Epic's estimate of the overall effort, separate from its linked stories
- You can quickly view the progress made on the linked stories by viewing custom fields on the Epic
- Optional: You can configure a Dashboard to visualize the status of Epics and their linked stories using the Filter Results Gadget
Environment
Jira Cloud
Solution
Step 1 – Configure custom fields
First, configure additional custom number type fields on your Epics to hold the sum of the linked stories' Story Points
Refer to Create a custom field for instructions.
This article will focus on gathering the sum of Story points of linked stories that are in the In Progress
and Done
status and also store the sum of all Story points in a custom field. This will require 3 new custom fields:
Things to note:
- The custom fields need to be associated with the correct project's screens during their creation
- To ensure the custom fields are only visible on Epics, refer to Configuring custom field contexts
Step 2 – Configure Automation rule(s)
In your project, create a new Automation rule under Project Settings > Automations with the following configuration
- For the trigger, choose Multiple issues events and configure the following events:
- Issue created
- Issue updated
- Next, configure a condition so the rule only proceeds if the trigger occurred on a Story issue type:
The rule only should continue if the Story issue type is linked to an Epic:
"parent" != EMPTY
Configure a Lookup issues action in order to create a reference to all the linked Stories (required for the calculation) with the following query:
"parent" = {{triggerIssue.parent}}
- Set up a Branch rule / related issues with the type of related issue set to Parent:
Within this branch choose the field to be updated with the sum. The value of the field is set to:
{{lookupIssues.Story Points.sum}}
(above we're updating the "Story Points of all linked stories" custom field)
Finally, name and publish your rule.
The above Automation rule will 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.
In order to up update the custom fields for Stories in the In Progress
or Done
status, 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.
For the Lookup issues component for In Progress
Stories use the following query:
"parent" = {{triggerIssue.parent}} AND "status" = "In Progress"
For the Lookup issues component for Done
Stories use the following query:
"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}}
After completing the above steps, the Automation rule will calculate the sum of all stories, all In Progress
stories and all Done
stories linked to the Epic whenever a linked Story is created or edited and store the values in the respective custom fields.