Automation Rule | Sum Up Story points to parent issue
Platform Notice: Cloud and Data Center - This article applies equally to both cloud and data center platforms.
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
Scenario: Consider the below requirement:
Epic A
Story 1
Story 2
Subtask x
Subtask c
Subtask z
The requirement is to update the story point of a parent (summing up):
Upon modification of the 'Story Points' field in any given subtask, there should be a corresponding update in its associated parent story. This update should reflect the cumulative sum of the 'Story Points' from all its subtasks.
Similarly, if there is an update in the 'Story Points' field of any story, it necessitates an update in the connected 'Epic Link'. This update should represent the aggregated 'Story Points' from all the stories within that specific 'Epic Link'.
Solution
Steps followed for the automation rule:
Trigger:
When: Value change for Story Points
Conditions:
If the Issue Type is one of the: Story or Sub-task
Actions:
If: Issue Type equals Sub-Task
Branch rule/related issues: For Parent
Then:
Action: Lookup
JQL : Parent = {{
issue.key}}
Action:
Edit Issue fields
Story Points =
{{lookupIssues.Story Points.sum}}
Else: (Action for Story)
Branch rule/related issues: For Epic (parent)
Then:
Action: Lookup
JQL: "Epic Link" = {{
issue.key}}
Action:
Edit Issue fields
Story Points =
{{lookupIssues.Story Points.sum}}
Configuration Enable:
Allow rule trigger, Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule.
Here is the Automation Rule Json to import:
Understand that you can use one of the next functions:
Sum: Sum all story points of the issues related.
Max: get the max value of the issues related.
Average: get the average value of the issues related
For Reference, review the following documentation: List functions for smart values A4J
Was this helpful?