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.
perfect, this works well now. thanks a lot for the quick responses! :D
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.
Hi @Utsav Kothari 👋🏻
While Jira natively supports tracking duration based on start and end dates, the built-in process is quite complex, which is exactly why our app offers a much more seamless and intuitive solution.
If you’re open to using a 3rd-party app to solve this seamlessly without losing precision, I can recommend ChronoFlow - Wait Time Analysis for Jira for this exact use case.
With ChronoFlow, you don't need any complex automation scripts or code manipulation. It handles the precision and business calendars out of the box:
🌱 Accurate Time Calculation
ChronoFlow can calculate the exact duration between your Start Date & Time and End Date & Time fields based on your configured business calendar.
🌱 Working Hours & Holiday Support
You can define your company’s working hours, weekends, and holidays. The calculation automatically excludes non-working time.
🌱 Time to Resolution & Time in Status
Track how long issues take to complete, or analyze how much working time is spent in each status (Open, In Progress, Waiting, etc.).
🌱 JQL-Based Reporting
Filter issues using JQL and analyze durations by project, priority, component, assignee, or any other criteria.
Regarding your automation error: Jira’s native Time Spent field is tied to worklogs and cannot be directly updated through Automation. Instead of trying to overwrite this field, ChronoFlow calculates the required duration from your date fields without requiring custom scripts or complex rules.
You can explore the app here: ChronoFlow - Wait Time Analysis for Jira
🍀 Feel free to reach out if you have any questions!
Disclaimer: I work for the vendor who developed this application.
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.