The goal is to: when a story, already attached to an Epic, has it's Story Points changed, that triggers automation to, from the triggering story, to looking at the associated Epic, find all the issue under that Epic, add up their individual Story Points, put that number in the Epic's Story Point field, drop a note in the Comments field, and be done.
There is quite a collection of asks and answers around this for regular fields, custom fields, adding up specific fields, whatever. I just can't get this to work. All the peripheral stuff does: I can write to the Labels field, I can write to the Comments field.
If I manually put some number in the Epic's Story Point field before triggering the automation, when the automation runs, it always overwrite the existing number with 0.
What am I doing wrong?
Cheers.
JGV
Overall Automation
Detail on the Story Points Calc
Pre-Changing a Story's Points
Post-Changing a Story's Points
Hello @gordon_varney
My suspicion is that the problem is your Lookup Issues JQL statement:
parent={{triggerIssue.parent.key|"null"}}
Why did you add |"null" ?
You might want to add a Log action after that to confirm that your Lookup Issues action is actually returning issues. You can log the smart value {{lookupIssues.size}} to see how many issues were found.
I would suggest putting the Lookup Issues action within the For Parent branch and use the JQL:
parent={{issue.key}}
There is no reason to execute the Lookup if the trigger issue doesn't have a parent. If the trigger issue doesn't have a parent, then the For Parent branch will not be executed.
Adding to Trudy's suggestions:
Your rule has multiple Edit Issue actions. Those changes potentially walk-over / collide with earlier saved data as actions use the current state of the issue in the rule's storage for the edit (and not what is stored in the cloud). This is intentional and is not a defect in the rule engine.
Why are you editing the issue multiple times rather than one time, selecting and updating the different fields needed?
When you need to edit an issue in a rule and have those results available for later steps, add the Re-fetch Issue action after the edit to reload the data. However this is likely not needed for the rule you show.
Kind regards,
Bill
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.