update Time worked field on case form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello all,
I'm trying to understand best approach to update "Time worked" field ( OOTB ) . And any impact updating the field.
i have to update Time worked value from 10 hours to 10 mins.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
The Time worked field on a Case (or any Task-based record) is not just a simple field update. Its value is closely tied to the Task Time Worked (task_time_worked ) table and the platform's time tracking mechanism.
Whenever an agent interacts with a Case form, the platform tracks the active time spent on that record. When the interaction ends (for example when the record is saved), the system calculates the time spent and:
Updates the Time worked field on the task/case record.
Inserts or updates a corresponding record in the task_time_worked table.
Because of this relationship, directly updating the Time worked field on the Case record can lead to data inconsistencies.
For example:
Initially, Case CS000001 shows 1 hour of time worked by agent XUser.
A record also exists in task_time_worked showing that XUser worked 1 hour on that Case.
If we directly update the Time worked field on the Case to 0 minutes, only the value on the Case record will change. The task_time_worked table will still contain the original record showing that XUser worked 1 hour on that Case.
This can lead to inconsistencies in:
Time tracking reports
Agent productivity reporting
Operational analytics based on worked time
Therefore, instead of directly updating the Time worked field on the Case, the recommended approach is to update the related records in the task_time_worked table.
Additionally, the system property:
com.snc.time_worked.update_task_timer
should be set to true, as it controls the execution of the out-of-box Business Rule "Update Task Timer" on the task_time_worked table. This ensures that when the time worked records are modified, the Time worked value on the parent task is recalculated correctly.
Following this approach maintains data integrity between the Case record and the time tracking entries.
Check Docs for Time Worked
Please let me know if this answer was helpful, or feel free to reply if you have any further questions.
