Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Sum the subtasks value

Douglas Oliveira
Contributor
November 12, 2021

Hi everybody,

 

I have a task with some subtasks, and in each of issues have a custom field "Valor Estimado R$", i would that this field in task was the sum of this same field in my subtasks.
I am trying to use a automation that worked it in another project for average, but doens't worked in this case. The most strange is that the rule dont triggered when i change the value of custom field. I expected that leastways a failure in a audit log.
Somebody can assist me in this situation?

Regards,
Douglas

image.pngimage.png

1 answer

0 votes
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.
November 12, 2021

Hi @Douglas Oliveira 

Is this a company-managed or team-managed project?

When you note this worked in another project, was it for the same field summation?  If so, was that a company-managed or team-managed project?

Finally, if this is a new custom field you are trying to sum up, have you confirmed the smart value is available via {{issue.subtasks}} with this how-to:

https://support.atlassian.com/jira-software-cloud/docs/find-the-smart-value-for-a-field/

If it is, you may need to use the custom field ID instead of the name, as the name appears to contain a dollar sign character.

Kind regards,
Bill

Douglas Oliveira
Contributor
November 16, 2021

Hi @[deleted] 

 

All my projects are Company-managed business projects, Only changing the template each. I belive that have a smart value for do this, I tryied to use the custom field ID but doenst worked.

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.
November 16, 2021

Hi, Douglas.

If you try to just log to the audit log that custom field's value for a single subtask, does it work as you expect?  That would confirm if the smart value can access that field.

Douglas Oliveira
Contributor
November 17, 2021

Hi @Bill Sheboy 

 

No, its doesnt work. Nothing happens...

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.
November 17, 2021

Thanks for that information.  Looking over the backlog, it appears that only some of the fields for subtasks are included in their parent's smart value: https://codebarrel.atlassian.net/browse/AUT-224

That means the only way to sum those accurately is to use the work-around by calling the REST API with JQL in a web request, and then summing the result using list functions.  If you would like more information about that technique, please let me know.

Like Douglas Oliveira likes this
Douglas Oliveira
Contributor
November 18, 2021

Thank you for your help @Bill Sheboy 

I was reading some stuff about this, I think I need some help with the rest of the API, but for now I'll pause this problem, next week I'll try to fix it again and put a feedback here.

 

Regards,

Douglas

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events