Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Automation story point estimate - sum of story points of child items in parent field

Hello,

 

I have a question.

I would like to create an automation that whenever I update the fields (story point) in the subtasks, the story point estimate field (story point field/Parent) is updated with the sum of the points informed in all the subtasks.
I did the automation below, but the field is not being updated.

 

image01.pngimage02.pngimage03.pngimage04.png

 

thanks

1 answer

1 vote
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 4, 2022

Hi @Pedro Henrique Barreto Carvalho 

Ignoring for a moment the practice of using story points with subtasks rather than just with stories...

Your estimated points field edit is on the Parent issue, but you are trying to:

  • reference the trigger issue, which is a subtask, and
  • using an invalid mathematical structure by adding to smart values without wrapping them with {{#=}} your smart values {{/}}

Instead you could just update the parent by summing the results each time in the branch with:

{{issue.subtasks.Story point estimate.sum|0}}

Please note this will work for a team-managed project, which uses Story point estimate.  If this is instead for a company-managed project, use Story points.

Kind regards,
Bill

Hello @Bill Sheboy 

thanks for the feedback. I have a project managed by the team. I tried to apply the code, but the field in the parent story(Sory point estimated) was not updated

Captura de tela de 2022-05-05 12-02-26.pngexample.png

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 5, 2022

For your smart value expression in the edit, it seems you changed the name.  Perhaps try the exact built-in field name to see if that works.  

{{issue.subtasks.Story point estimate.sum|0}}

I wondered about that as your trigger also shows "Story point estimate" and not the one you typed in as "Story point estimado".

Thanks for the feedback. I received the points return by email, but the field: story estimated points was not updated.
Do I need to do this update via code (more options)? Would you help me?

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 6, 2022

You seem to be using a custom field named "estimated points", and so when you copy/paste that smart value expression into the edit value, it will appear below the field...then you may select it and it will be used.

If instead you want to update the parent issue's actual "Story point estimate" field, that can only be done with JSON under "more options".

Which do you want to do?

Hi @Bill Sheboy 

I would like to do it for Json. Can you help me?

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 6, 2022

First, here is the documentation on using JSON for the edits and I encourage you to review it as it can help identify problems and provides how-to ideas: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/

For updating Story point estimate in the parent for the sum of the children, please try:

{
"fields": {
"Story point estimate": "{{issue.subtasks.Story point estimate.sum|0}}"
}
}

 

Thanks for support

 

I managed to solve it with the code below

{
"update": {
"Story Point estimate" : [{
"set": {{issue.subtasks.Story point estimate.sum|0}}
}]
}
}

Like Bill Sheboy likes this
Reha Jhunjhunwala
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 2, 2024

I tried the same code for subtasks and it worked! Trying it for epics and the rule succeeds but i dont see a sum of the story point estimates. Using this -- 

{
"update": {
"Story Point estimate" : [{
"set": {{issue.task.Story point estimate.sum|0}}
}]
}
}

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 2, 2024

Hi @Reha Jhunjhunwala -- Welcome to the Atlassian Community!

As this is a very old thread, I recommend you create a new question, perhaps linking back to this one.  That will ensure the maximum number of people see it to offer suggestions.  Thanks!

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events