Hi community,
I am trying to get the following using a Jira Automation rule (company managed Jira):
By triggering an automation rule by logging an hour (using Clockwork for Jira) on story level (or spike, task, bug etc):
1. Find the associated parent epic
2. Fetch the sum of the story points of all child issues of that epic -> create a variable (named: TotalStoryPoints)
3. Fetch the sum of the story points of all child issues of that with status 'Done', create another variable (named: StoryPointsCompleted)
4. Deduct StoryPointsCompleted from TotalStoryPoints and multiply by 5 (which is our long-term average of hours we spend per storypoint) to update a custom field I created on epic level (Time Forecast)
JQL for step 2:

Variable for step 2:

JQL for step 3:

Variable for step 3:

Math for step 4:

Seen a few almost similar cases on the community forum, but don't seem to find the exact solution. Managed to fetch the right input issues, but esp. the calculation at the end doesn't seem to work. Any help is greatly appreciated! Thanks, Martijn