Disable edit on Time Worked field

milesdpratt
Giga Contributor

We have a request to make the time worked field read only to disable edits to the time. I tried making it a read only field, but that removes the timer completely.

Anyone know how to keep the timer running but disable edits to the hours/minutes/seconds fields?

1 ACCEPTED SOLUTION

open ui policy and short desc is "Time worked read only"



Regards,


Harish


View solution in original post

14 REPLIES 14

This login is not valid.   Can you share the content of the UI Policy instead?   I tried a simple one on task.time_worked, Read only = true, but that is not working.


This worked perfectly. Thanks to both of you for your suggestions.


David Stutter
Tera Guru

Using an UI Script with following script:

jQuery("input[data-type='timer'][type='text']").prop('disabled', true);

Looking for the three input fields ( hours, minutes, seconds ) and disable them.

The counter is running, stop button is still there and after save the time is correctly saved.

 

Thanks Harish Murikinati for never providing the content of your doing.

I couldn't quite get this working. Where did you call the UI Script?

Shame on me for saying UI Script.

I wrote the code into a UI Policy in the "Execute if true" field, in my scenario only a specific group of agents should trigger this behavior.

You could also use the code in a Client Script on "onLoad".