How to keep track of the total hours for a ticket
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2024 01:44 PM
I’ve set up two fields in the Incident table:
- Time Spent (The number of minutes worked on the ticket during the current update)
- Total Time Spent (The running total of all Time Spent entries for this ticket)
What I need help with is writing a business rule that will automatically update the Total Time Spent field whenever the Time Spent field gets a new value.
This will help us keep track of the total time spent on the ticket so we can compare it to the initial time estimate.
I couldn't find any information, just this https://www.servicenow.com/community/developer-forum/how-to-capture-total-time-duration-for-a-group-...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2024 02:28 PM
You know there is an out of the box field that does this already. Its called Time worked. It saves the data to another table for every update. You can then use this table in a report and do list calculation on it. You may want to look into this before creating your own fields. This also works on all task type that are extended from the task table (incident, problem, change, catalog tasks, etc.). You just need to add it to the form layout. Then you can see not only how much time someone is spending on incidents but all task types.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2024 02:41 PM
I see that table is 'task_time_worked' for reporting on, thanks for pointing that out.