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

Tejas Adhalrao
Kilo Sage

hi @albertosaenz  ,

If you need to capture the actual working period, you can customize the process by adding custom fields such as Work Start Time and Work End Time.

For example:

  • Populate the Work Start Time when the task state changes to In Progress.
  • Populate the Work End Time when the work is completed (or when the state changes to Closed Complete, depending on your process).
  • You can then calculate the total time spent using these two fields. If the fields are only for reporting, you can keep them hidden from users.

This approach works well if your requirement is to track when work actually started and ended, rather than just the duration entered in the Time Worked field. you can hide the start time and end time field and show only  total time spent  on the form . let me know if you need script and step by step solution

 

If this helped, please mark it as Helpful. If it resolved your issue, please mark it as the Accepted Solution.