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

Run automation only on parent of trigger issue

Esteban Halabi
Contributor
October 30, 2024

Hi everyone. I'm trying to build an automation to calculate the total debt for a specific client.

Epics are my clients and my tasks "Facturas" are Bills.

My tasks have a numeric field "Monto" (amount) and I need to sum that field across all child tasks IN THAT SPECIFIC EPIC and input that value into the "monto" field in the Epic.

I've managed to create an automation that adds up the values HOWEVER it sums ALL bills across ALL epics into that specific client.

Is there a way to have the automation sum up ONLY the child issues of the epic I want?

Screenshot 2024-10-31 015831.png

my idea was to run the automation straight from a Bill and impact the client. But maybe I should run it the other way around? 

 

I'm a bit lost I'm not sure how to achieve the goal.

 

Hope that all makes sense thank you!

2 answers

2 accepted

7 votes
Answer accepted
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 30, 2024

Hi @Esteban Halabi - I think @John Funk answered something similar here back in May:

He got the average of children's fields, instead of sum:

Screenshot.png

You'll need to adjust your Lookup JQL to: 

parent = {{triggerIssue.parent.key}}

And you then Edit your "Monto" field (in the parent) to be:

{{lookupIssues.Monto.sum}}

Let us know if this works!

Esteban Halabi
Contributor
October 31, 2024

Appreciate the response! adding "and Parent={{issue.key}}" to my JQL Lookup did the trick.

 

Thank you for your detailed response!

Like John Funk likes this
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 31, 2024

Glad it worked, and ooof, yes, it should be parent, not parentEpic, as John and @Trudy Claspill pointed out.

I've corrected my answer.

Like Esteban Halabi likes this
3 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 30, 2024

Hello @Esteban Halabi 

First, in your Lookup Issues action you need to change your JQL. As it is written currently it is retrieving all the Facturas issues, not just the ones under the Epic. Add to that JQL:

and Parent={{issue.key}}

If that doesn't fix your rule then please share the details of the Edit Issue step.

As an alternative to running the automation manually you could do any of the following:

- Run it whenever the Monto value in a Facturas issues is updated

- Run it on a schedule to recalculate for all Epics that you select using a JQL.

- Run it when a Facturas issues experiences a change of Epic.

Esteban Halabi
Contributor
October 31, 2024

This worked! I knew I was missing something like that! thank you very much!

Like John Funk likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events