Leveraging this discussion, Solved: Smart Value to display the sum of child issues lin... (atlassian.com), I created two custom fields that calculate the total number of story points and the total number of issues per epic via the attached automaton. The next step is to have the automation trigger whenever a child issue is added or deleted. At the moment it only updates if a child issue is added and not when a child issue is removed.
Additionally, I'm looking for a way to update existing epics in bulk without breaking the system.
PS Company managed and in the cloud.
Hello @CC
You will need a separate rule to catch when an issue is removed from an Epic.
This rule includes Log actions with the Smart Values that give you the New and Original value for the Epic Link when it has been changed.
What you care about is when the {{fromString}} value is not EMPTY. That means the issue was associated with an Epic before, but is now associated with a different Epic or no Epic at all.
You then need to branch to the former parent Epic, look up its current children, and use the sum function to reset the values in the Epic.
Make sure to use an OR option to set the field to zero in case the Lookup Issues action returns no issues.
We didn't address your question about updating existing Epics, without making changes to the child stories.
For that I would recommend that you create a Schedule trigger. In the Trigger include a JQL for selecting the Epic issues. Then add the Lookup Issues step and Edit Issues steps. You don't need any branches because the steps will be executed for each issue returned by the JQL in the trigger.
It doesn't matter what schedule you set on the trigger. After publishing the issue you can select the Run Now button to run it immediately, and then disable the rule so it doesn't actually run on a schedule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @CC
There are several scenarios to handle:
For the last of these please use the Issue Created trigger. For the others please use the Issue Updated trigger, and add conditional logic to check the changelog for changes to the Epic Link field. Please look here to learn more about that smart value: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--changelog--
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.
@Bill Sheboy @Trudy Claspill Thank you both so much. Give me a few days to put it on in motion. Thank you again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.