Hello,
I have the following automation in my project:
The automations ensures that the custom field "Detail Sum Effort CON" at the Epic level is updated whenever the value of the custom field "Detail Effort CON" changes at the Story level.
Trigger:
The rule is triggered when the field "Detail Effort CON" of an issue is modified.
Conditions:
The issue must be of type Story (Issue Type ID: XXXX).
The issue must be linked to an Epic.
Actions within the Epic Branch:
Lookup Issues: A JQL search is performed to find all Stories linked to the same Epic.
The JQL query: "Parent" = {{issue.key}}
This means it searches for all Stories that have the same Epic as their parent.
Summation & Updating the Epic Field:
The field "Detail Sum Effort CON" in the Epic is updated with the sum of all "Detail Effort CON" values from the retrieved Stories:
{{lookupIssues."Detail Effort CON".sum|0}}
If no Stories are found, the value is set to 0.
If a new Story is added to an Epic, the rule only triggers if its field "Detail Effort CON" is modified.
If a Story is deleted, there is no direct trigger to update the sum.
So far I have not found a working solution for these questions and hope that you can help me.
Solutions:
A separate rule with the "Issue Created" trigger to recalculate the sum when a new Story is added to an Epic.
A seperate rule with "Issue deleted from Epic" trigger to recalculate the sum when a Story is deleted from the Epic or deleted from the project.
Regards,
Joscha
For field sync / sum scenarios there are often many cases involved. Deciding the accuracy and frequency will determine how many rules are needed and their respective logic.
Here are some of the cases to consider:
Some of these rules can be combined, using conditional logic. For example, # 3, 4, and 5.
Others are subject to problems / racetrack errors apparently due to defects in automation after the change to sunset the "Epic link" field and switch to the "parent" field. For example, there are defects which would impact # 1, 3, 4, 5, and possibly 6. Here are the defects if you want to watch / vote for them to see updates:
You also appear to have a Premium license level, and so have more automation usage capacity available. When one has a Free or Standard license level, using this many rules to sync a field value could easily consume the monthly allocation for rules, halting their execution. The workaround for that is to use a single, scheduled trigger rule to only update once per day.
Kind regards,
Bill
Hi @Bill Sheboy ,
thanks for your detailed breakdown and the provided information!
I have checked with my instance admin, and automation limits are not a concern at the moment.
Here’s what I have addressed so far:
Story is created with an Epic assigned → update the Epic
➝ open
Story's field is changed when it has an Epic → update the Epic
➝ Already implemented: For example the field "Detail Sum Effort CON" in the Epic is updated when the field "Detail Effort CON" in a Story changes.
Story is removed from an Epic → update the previous Epic
➝ Open
Story is added to an Epic → update the new Epic
➝ Open
Story is changed from one to another Epic → update both the previous and new Epics
➝ Open
Story is deleted → update the previous Epic
➝ Open
Person manually changes the field in the Epic → update the Epic to recalculate the sum
➝ Not needed: I will remove this field from the Edit Screen at the Epic level to ensure manual changes are not possible. Efforts should only be added at the Story level.
Story and Epic issues exist before the rules were implemented → using a Scheduled trigger rule, identify and update all relevant Epics
➝Open: This is a great idea to ensure data integrity, e.g., by running a recalculation once per day.
I am currently struggling with the implementation of some of these rules and would appreciate your help.
Do you have example automations for the mentioned points.
I am particularly unsure how to structure the triggers and conditions for these cases.
Any example or hint in the right direction would be really helpful!
All the best,
Joscha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It just occurred to me that we need another rule for when a story is rejected.
So, change the status to "Rejected."
Story Status is changed to rejected --> Values are removed from Epic.
Regards,
Joscha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I recommend incrementally adding rules; that will help see which ones can be combined and how.
For example, for the issue created one...
And repeat...
The most challenging ones are when the Parent field changes, as that would use the {{#changlog.parent}}{{fromString}}{{/}} smart value (and the current value) with conditions to access each Epic using branching. That single rule could handle:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy
I have now implemented the following.
This seems to work good for now.
"Recalculate the Sum Effort Detail on Epic X if story is deleted from this Epic
Recalculate the sum Effort Detail on Epic Y if story is added to this Epic"
Thanks for your help.
Screenshot attached for the community.
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.