- The
Story point estimate
field for a task with subtasks should equal the sum of its subtasks' values for the same field. - When I change the
Story point estimate
value of a subtask, the same field of the parent task should update so it still equals the sum of the subtaskStory point estimate
fields. - Ideally, each
story
'sStory point estimate
value should also be a sum of the same field of itstasks
, but this seems more complicated because of a limitation of Jira's smart values for issues and because in this project,tasks/issues
are notchildren
of astory
. They are justrelated to
it. Maybe it's better if they have a parent-child relationship, but I'm not sure how many levels this can span.
{{issue.parent}}
- Accesses the details of a subtask's parent issue. Can only be used when the active issue is a subtask, and can't be used to access a standard issue's parent issue.
I made an automation with the following logic (pseudocode):
const targetField = 'Story point estimate'
if (changedValueForField(targetField) && changedFieldBelongsTo(Subtask)) {
const parent = getParentOf(Subtask)
parent.setFieldValue(targetField, sumOf(parent.subtasks.targetField))
}
My project was a team-managed project
but the tutorial used company-managed Jira
, so the name of the fields were different. From relevant docs:
{{Story Points}}
- Returns the story points for the issue (company-managed Jira Software)
{{Story point estimate}}
- Returns the story points for the issue (team-managed Jira Software)
Here are the changes required to make the tutorial code work in my case:
Change | Jira Tutorial ❌ | Working Solution ✅ |
---|---|---|
field watched | Story Points |
Story point estimate |
issue type monitored | Sub-task |
하위 작업 (Sub-task in Korean) |
field to edit | Select Story Points from dropdown |
More options => JSON = {"fields":{"Story point estimate": {{issue.subtasks.Story point estimate.sum}}}} |
- This tutorial from the Atlassian template library was helpful, but required some changes to work for my unique situation. Here is an interactive rule from the tutorial.
- Only single-project automations are possible on the Standard version of Jira. The Premium version allows global and multi-project automations. (Details)