Hello,
I need to create an automation rule to reflect the correct total of the "Time tracking" field on Epic as a sum of the "Time tracking" values of its tasks.
I made the following configuration (the screenshots below), but it doesn't calculate the total value correctly. When I log 5 min to a task for the first time after rule activation, it returns the correct total value for epic: 4d 1h 25m. But when I log 5 min for the second time, the "Time tracking" epic field shows me an enormous value: 1w 3d 3h 5m instead of 4d 1h 30m.
I'm not sure if it's important or not: some of my tasks already had time logged on before rule activation. So I need the epic total to reflect these values as well + newly logged values.
Thanks.
The advanced "Edit issue fields" block is the following:
Greetings, and welcome to the Atlassian Community!
Based on what you are describing, it seems you are adding the current total time rather than the time which was just logged and seen by the rule trigger.
As shown here, the timeSpent smart value is the total time: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--issue.timetracking--
If you want the time which was just logged to be added to the parent, try using the fields in the {{worklog}} smart value from the trigger. Then there would be no need to use the lookup issues action for this rule. https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--worklog--
The lookup issues would only be needed if you wanted to update the parent issues to a known starting point. That could use a different rule, to update each parent one time to catch-up. Then that rule could be disabled.
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.