Can I use automation to increase a parent's field value (eg: points) when I create a sub-task?

James Mears June 10, 2020

As we work through a story or a task, we add sub-tasks to them to detail the work that is being performed. We estimate those sub-tasks with points. JIRA doesn't use those points to add to the original parent story / task estimate, which skews our reporting for Sprints - if a story had an original estimate of 4 points, but ended up with 10 points of sub-tasks, the reporting won't show that - only the original 4.

The manual solution is simply to add to the original parent estimate every time a sub-task is created within it, but it would be nice to automate this, something like

 

IF subtask created THEN add subtask's story points to parent task's story points

Looking through the NextGen automation tools, I can only see a way of over-writing the parent task story point field with whatever is entered in the sub-field - not adding (or indeed subtracting should the subtask be deemed unnecessary. Any help much appreciated, even if it's to say "no can do" and I tell the team they have to update manually!

Thanks

1 answer

1 accepted

0 votes
Answer accepted
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 11, 2020

Hello @James Mears ,

Welcome to the Atlassian Community!

According to similar thread, it should be possible to achieve this by using {{subtasks.Story Points.join(" + ")}}

 

What you should do is to create a rule that on issue creation check if the parent exists and, if it does, edit the story point field to add the sum of the story points of all the children. 

Something like:

A4J-add-story-points-to-parent-on-subtask-creation.jpg

 

 

Another example showing how to sum subtasks story points is available at: https://blog.codebarrel.io/calculated-customfields-and-math-expressions-5eacad80e4e8

 

I hope this helps.

 

Cheers,
Dario

James Mears June 11, 2020

Hi Dario, this worked perfectly with a bit of customisation thanks to your links, thank you very much!

Like Dario B likes this
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 12, 2020

You are very welcome @James Mears, have a nice weekend! :) 

Misty Meyers August 10, 2020

Good morning!
This response helped me a lot.  However, I have another question for @Dario B .

Your {{subtasks.Story Points.join(" + ")}} takes the points of the subtasks and sum in the Parent story point field.  How could I modify so that the sum of the subtasks are added to the story points existing at the Parent issue level?

Thank you!

Misty Meyers August 10, 2020

 

 

{{#=}}{{issue.Story Points}}+{{subtasks.Story Points.join(" + ")}} {{/}}

Suggest an answer

Log in or Sign up to answer