hi, in some critical cases we want to monitor the time taken to finish a task. the team has been asked to update the fields "Start date & time" and "End date & time". Is there any way the time taken (in hours) can be calculated and automatically updated in the field "Time tracking". if not in "Time tracking", which other field can be used to update the time taken from the difference between end date time & start date time. As of now I'm not getting the option to select the field "Time tracking", instead I have selected original estimate. but I want time "Time spent" in "Time tracking" field to be updated with the hours.
I tried setting up an automation, but getting the below error with it:
and this is the automation workflow. I have added the smart
value {{issue.customfield_10134.diff(issue.customfield_10133).hours}}h
You mixing here a little concepts.
Time spent isn't updated with Edit work item. It comes from worklogs. Updating Original estimate only updates the planned estimate, not logged time.
skip "Original estimate" as it's only for planning.
To update native time spent: Use the Log work action (not Edit issue) with: {{issue.EndDate.diff(issue.StartDate).minutes.abs}}m.
Prevent double-logging by adding a condition if dates are edited later. For reporting only, calculate this into a custom Number field instead of creating worklogs. That's not really clean.
Best,
Arkadiusz 🤠 ☀️
hi @Arkadiusz Wroblewski thank you for pointing this out. however, when I try to use the "Log work" action, I'm getting below config where it looks like it's asking for fixated values. do you have anything on this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Time spent: {{issue.customfield_10134.diff(issue.customfield_10133).minutes.abs}}m
Date started: {{issue.customfield_10133.jiraDateTime}}
If the .jiraDateTime function doesn't validate in your specific automation action, just fall back to the raw field value {{issue.customfield_10133}}.
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.