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?
Hello @Alexander Makarovsky
As a debugging step you should print each of those smart values into the rule Audit Log so that you can see if the values being compared are what you expect.
You can print information into the Audit Log using the Log action in the rule.
Nice! Thank you!
I've done it and it seems {{issue.originalestimate}} returns nothing
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok, now I understand. It was a simple mistake, since smart value for Original estimate should be issue.timetracking.originalEstimate
Problem solved.
Thank you so much!
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.