Hi there! I have a task to track when time spent by specific developer exceeds original estimate.
What I've done is created a custom field named "dev-total" using JCMF Calculated (scripted) Duration Field with formula:
employeeKey = issue.get("customfield_12116")?.key; worklogs = issue.get("worklog")?.findAll({it.authorKey == employeeKey }); return worklogs.sum(0, { it.timeSpent });
where customfield_12116 is a field where developer is assigned.
Field works perfectly fine.
Than I've created an automation rule with compare condition.

And it doesn't work. It performs even if time spent by a developer is less than original estimate.
What am I doing wrong?