Automation For Jira - How to create a rule that sums up the story points from sub-tasks of a parent issue
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
This article describes how to create an Automation Rule using the add-on Automation For Jira (for Jira Server/Data Center) meant to:
Calculate the sum of the Story Points field from all the sub-tasks of a parent issue (Story type issue, Task type issue, Bug type issue, etc...)
Copy that value to the Story Points field of the parent issue
Solution
The rule will need to be configured as follows:
Add the Field value changed trigger with the following settings
Field to monitor: Story Points
Add an Issue field condition with the following settings:
Field: Issue type
Condition: Equal
Value: Sub-task
Add the following Branch rule
Type of related issues: Parent
Inside the Branch Rule, add the action below:
Edit Issue
In the Choose field to set the menu, select Story Points, and paste the expression below:
{{issue.subtasks.Story Points.sum}}
Screenshot showing the rule
![Screenshot showing the automation rule](https://images.ctfassets.net/zsv3d0ugroxu/is78qIx4fEudFiHJH5g7D/f66176b1a4276c729dfeac5e041134ae/StoryPoints_AutomationRuleConfiguration.png)
Was this helpful?