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

Can we sum up "number" fields of all child issues and update parent's ?? (Not task/subtask)

testJira seb April 7, 2022

Hi,

I am on DC (not cloud) and unable to find out automation rule about sum in the case

 

Can we sum up "number" fields of all child issues and update parent's ?? (Not task and subtask, but with ParentLink and childLink)



Remember
- child A have number field = 12
- child B have number field  = 10
- Parent issue (with parentlink, not task/subtask) = 22 (first time it is correct)
- This is fine so far but
- A : 12 -> 15 (updated)
- Parent Issue = 37 (not 25 like it should)

the problem is solved if we use tasks and subtasks = a solution exists

BUT

tasks and subtasks being limited to a single level (you cannot create several nested subtasks).  As a result, it is possible, for a tree structure of this type, to use the principle of Parentlink/Childlink ; and therefore no more limit to a single sub-level but as many as desired

I've seen all of these answers (about "sum" pbl), which work great for task and subtask cases.
On the other hand, it is impossible to run a procedure correctly with the ParentLink / childlink. For these cases, we fall into the same process.
Do you have a solution for this type of case?

Thanks all.

2 answers

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.
April 7, 2022

Hi @testJira seb -- Welcome to the Atlassian Community!

Just to confirm, are you noting that you have an automation rule and it works once and then produces incorrect results on later executions?

If so, please post an image of your complete rule, including the details of the field action, and the audit log details showing both a first and later execution run.  That information may provide context for the community to offer suggestions.  Thanks!

Kind regards,
Bill

testJira seb April 10, 2022

Hi Bill,

automation rule works but results are incorrect.

here is example = we don't use "task/subtask" but "parent link". so we use "issue IN parentIssuesOf( {{issue.key}} )" to get parent ... But after that, how to get info about childs ?

with task/subtask, we use "subtasks" keyword (for example, to "sum" infos)

keyword with parent and childs ?

testJira seb April 10, 2022

Capture.PNG

testJira seb April 10, 2022

try "childIssues" but No.

other one ? ;-)

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 11, 2022

If "parent link" is the field linking your issues, try using a Lookup Issues action to gather the sibling issues of the trigger issue with this JQL:

"Parent Link" = {{triggerIssue.Parent link"}}

You may then sum your field using the lookup results, for example:

{{lookupIssues.myCustomFieldName.sum}}

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 11, 2022

@Bill Sheboy lookupIssues is only available on cloud. It´s DC in this case =S

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 11, 2022

Thanks, Stefan; I missed that!

Unfortunately Lookup Issues and nested branches are not supported yet, so the work-arounds are limited: entity properties and a scheduled rule with bulk-processing that includes a branch to the parent.

0 votes
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 7, 2022

Hi @testJira seb and welcome to the community,

did a quick research and found a feature request for that. You can upvote for it here:

https://jira.atlassian.com/browse/JIRAAUTOSERVER-135

As I got your requirement and the above mentioned feature request right it‘s not possible yet.

Best
Stefan

testJira seb April 10, 2022

Hi Stefan, yes https://jira.atlassian.com/browse/JIRAAUTOSERVER-135 is the same way.

we can go to parent with

issue in parentIssuesOf("{{issue.key}}") 

but how to get informations about all childs ?

Bérengère PERES March 29, 2023

Dear community, 

Have we finally found out how to designate all the child issues of a given Parent issue in that use case?

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 29, 2023

Hi @Bérengère PERES 

How exactly does your hierarchy define parent and child? Are you using advanced roadmaps? 

What does your use case look like that needs to be solved?

Best
Stefan

Like Bill Sheboy likes this
Bérengère PERES April 2, 2023

Thank you @Stefan Salzl 

I have exactly the same use case than TestJira Seb's one : In Jira DC, I have an issue types hierarchy corresponding to  Advanced Roadmaps hierarchy settings. My Parent and Child issue types are linked by the field Parent link. I am able in my automation rule to refer to the the parent issue to be updated but i cannot find out how to refer to my number fields in child issues that must be summed. 

Regards,

BP

Like jennifer.sewell likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events