Time Worked Field... no auto counter, just a field to enter time upon closure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2011 03:15 PM
So... my managers want that "Time worked" field to appear for certain groups when they close their incidents, and they want it to be mandatory.
However, they don't want it automatically counting. They just want a mandatory field to appear when they put the incident state to "Resolved."
I can accomplish that with a UI policy that only shows the field when the incident state is closed or resolved, and only if the group starts with ERP (the group in question).
Problem is, if I do that, a timer field appears and starts counting up. I just want them to type in the amount of time they feel they worked on the issue.
Is this possible? More easily done with a numerical text input field?
Let me know, thanks!
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2011 04:23 PM
You should be able to incorporate a timer pause into your client script. Here's an article showing how you can do that.
http://www.servicenowguru.com/scripting/client-scripts-scripting/pausetoggle-time-worked-field/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2011 04:40 PM
Thanks. I think having it always paused will be a good enough solution for them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2012 02:53 PM
I unchecked that box so all the timers start paused.
I set the timer to only be visible when the state is set to "resolved" so the resolver can put in the time they worked on it.
The problem is, it has a few seconds on it for some reason. Possibly because when creating the incident, it's counting "in the background" even though the field isn't visible?
Once I change the state to resolved and the field appears, it is paused.
Any ideas?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2012 03:07 PM
The problem is that the pause event doesn't happen until the form has finished loading (which may take a few seconds depending on how much you've got going on in your form). The article on SNCGuru shows you how to use a script to pause the timer field. It also allows you to pass in a time parameter to reset the timer on load since it usually takes a couple of seconds for the timer to pause.