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?
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!
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:
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!
Appreciate the response! adding "and Parent={{issue.key}}" to my JQL Lookup did the trick.
Thank you for your detailed response!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad it worked, and ooof, yes, it should be parent, not parentEpic, as John and @Trudy Claspill pointed out.
I've corrected my answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This worked! I knew I was missing something like that! thank you very much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.