Time worked field

scottjus82
Kilo Guru

Morning,

 

Isthere away of swtiching off the time worked timer? We are looking at using time cards and the way it all works and the reporting we can generate provides exactly what we want other than we want the time to be a manual field that is mandatory. Counting the length of time the ticket is open is not a good measure of how long someone has worked on a ticket.

 

Any thoughts?

1 ACCEPTED SOLUTION

marcguy
ServiceNow Employee
ServiceNow Employee

the property glide.ui.timer.started is available to set to false, but i've seen a few posts saying it doesn't always work, I did see this post here though which does it in a client script:



http://www.servicenowguru.com/scripting/client-scripts-scripting/pausetoggle-time-worked-field/


View solution in original post

4 REPLIES 4

marcguy
ServiceNow Employee
ServiceNow Employee

the property glide.ui.timer.started is available to set to false, but i've seen a few posts saying it doesn't always work, I did see this post here though which does it in a client script:



http://www.servicenowguru.com/scripting/client-scripts-scripting/pausetoggle-time-worked-field/


Having done some testing is there any way to stop it from saving auto entrys to the time card? If I open a ticket the timer is not running however when I save it there is still an entry made for how long the ticket was open. I only want manual entrys to go onto the time card.



Any thoughts?


marcguy
ServiceNow Employee
ServiceNow Employee

strange because the 'Task Time Worked' Business rule on incident should only fire as it's condition:



current.time_worked.changes()



so if the value is 0 it shouldn't be firing unless the previous value is different.



so unless the user modifies the time worked manually it should not fire.



I just tested on my own instance and


1 - left it blank (no entry was created)


2 - added 1 hour (an entry was created)


3 - left it blank (no entry was created)



so it seems to NOT create one for me if left alone.


scottjus82
Kilo Guru

Hi,



Thanks for the help, the script worked exactly as required.