Calculate only 8 hours per day for Spent time field
Hello!
I setup Project-Related Settings -> Time Tracking Settings like this: http://prntscr.com/j16mhc
So, I want, that youtrack calculate only 8 hours per day, for example from 10:00 to 19:00 , but now, system consider 24 hours per day(
For example i move task to "in progress" at 18:00 and finish it at 13:00 next day. It should be ~4hours, but now it's bit more...
http://prntscr.com/j16tr9 — 1:30 much better then 1d26m (8h26m)...
How can i do it? Spent time -> 1h30m
I'm using "In Progress Work Timer @jetbrains/youtrack-workflow-work-timer"
Thank you
** Cloud :) JetBrains Bug & Issue Tracker YouTrack 2018.1 Build 40341 Thu, Mar 22, 2018,
Please sign in to leave a comment.
Hi,
Time tracking in YouTrack is not aware of the time when the working day is started and ended. Therefore there is no way to calculate the time you've actually spent on a task. Our algorithm assumes that the start and the end of your working interval are in one day (which is true for many cases). It calculated the diff, which is about 19 astronomic hours, then assumed that those are the hours of one day, so you worked for no more than 1 working day (which is 8 hours).
I do understand that this algorithm behaves strangely in some cases, but again, I do not see an ideal solution. As for the workarounds, there are at least 2 of them:
1. Always move a task to the Open state at the end of the day and back to In Progress the other day. If the time tracking is used for the billing, it is quite fair, as it indicates the actual time you've spent on a task.
2. With the knowledge about the working hours, you can update the workflow and calculate the duration more accurately.
I assume that the code in the second case can be quite verbose. I would suggest writing a simple on-schedule rule which will move all 'In Progress' tasks to 'Open' state at the end of the day so that you don't forget about this routine.