Use PDIs? Take our 5-minute survey to help shape the PDI roadmap.

Track start and end time of time worked

albertosaenz
Tera Contributor

With time worked I can record the time spent working on a task, but how can I track actual start and end time of the time worked?

1 ACCEPTED SOLUTION

Suryansh Verma
Mega Sage

Hello @albertosaenz 

 

As already mentioned in the thread, there is no OOTB start and end timestamp on an individual task_time_worked record. OOTB Time Worked records contain a Work Date and duration, while Time Cards aggregate those hours.

For manually entered sessions, you can add two Date/Time fields: Work started and Work ended to task_time_worked. Use a Before Insert/Update Business Rule to validate that the end is later than the start and calculate the OOTB-Time worked duration using GlideDateTime.subtract(). Keep the Time worked field read-only when timestamps are provided.

When the requirement is to track live work sessions, use a custom Work Session table with Start Work and Stop Work actions. On Stop, calculate the duration and create the corresponding OOTB Time Worked record. The standard task timer should not be treated as an accurate work-session tracker because it measures the time that the record remains open unless the user manually pauses it.

 

If it is helpful, please mark it as helpful and accept the correct solution by referring to this solution in the future, it will be helpful to them.

View solution in original post

5 REPLIES 5

Mark Manders
Giga Patron

There is no OOB way to do that. Question is: why would you want to? 

If you start using time cards, they can update it themselves. The 'time worked' is just a timer that starts when you open a record and stops when you close it. With that, it makes no sense to use it as a real 'time worked' field.

Because at 8am I open a ticket and work on it for 5 minutes. I receive a call and open a different tab to work on something else. When I come back at 10am, the timer is at 2 hours, not 5 minutes.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

The time worked can work either as a timer or with manual entry.

Customer is useing the manual entry functionality and wants to have start time and end time for each manual entry. That is to say:

Start time: 8:00

End time: 10:30

-> Time worked = 2h 30min

I know that this is not possible just using task_time_woked OOB functionality, but I am wondering if there is any other way OOB.

I think Time Cards do not have that functionality either.

Mark Manders
Giga Patron

There is no way to get this OOB. It's also a weird requirement. 

But the system itself only records the exact time something gets updated. Not when you start updating, so this is not possible.

Have them explain why they need this, because it doesn't really make sense.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Suryansh Verma
Mega Sage

Hello @albertosaenz 

 

As already mentioned in the thread, there is no OOTB start and end timestamp on an individual task_time_worked record. OOTB Time Worked records contain a Work Date and duration, while Time Cards aggregate those hours.

For manually entered sessions, you can add two Date/Time fields: Work started and Work ended to task_time_worked. Use a Before Insert/Update Business Rule to validate that the end is later than the start and calculate the OOTB-Time worked duration using GlideDateTime.subtract(). Keep the Time worked field read-only when timestamps are provided.

When the requirement is to track live work sessions, use a custom Work Session table with Start Work and Stop Work actions. On Stop, calculate the duration and create the corresponding OOTB Time Worked record. The standard task timer should not be treated as an accurate work-session tracker because it measures the time that the record remains open unless the user manually pauses it.

 

If it is helpful, please mark it as helpful and accept the correct solution by referring to this solution in the future, it will be helpful to them.