Resolve Time Column does not captures the time when the ticket is resolved

Not applicable

Once we enter into the Incident Management>All incidents, we find Resolve time column on the displayed table.The "Resolve Time" field is automatically updated when a ticket is put in a "Closed" state, this field is not updated in any other state.The "Resolve Time" field should get updated once the status of the ticket changed to "Resolved".
Any ideas would be helpful here.Please help in fixing this urgently.

Can you please provide us the script/code for this business rule to capture date and time once the ticket is marked into "Resolved" state.

9 REPLIES 9

Thanks a lot again, MB.

The second option appears logical, I will try it out and let you know.

Thanks,
Sourabh.


sprasad
Kilo Explorer

I created a date/time field "u_resolve_time" used the following script:

if (current.state == 6) // value of Resolve State
{
if (current.u_resolve_time.nil())
{
current.u_resolve_time = gs.nowDateTime();
}
}

but still the resolve timestamp is not getting captured. Attached the screenshot of the business rule.


MB26
ServiceNow Employee
ServiceNow Employee

Two things you will want to change. Make it a before query, and change the Run at to be server. Try that and let me know.


Thanks a again MB, it worked this time.
So I understand the time is captured from the server now but not the local internet client and everyone will be seeing the same time.
Thanks for the help again.


Sivakrishna
Kilo Sage

@sprasad 

I have also facing same issue. Can you post the business rule code which is worked for you, capturing the date time in resolved field.

 

Thanks

 

P.Sivakrishna