Date should capture when the incident is resolved

manisha3014
Kilo Contributor

Hi   All....on incident form i have to create a new field called "Last Resolved' on the Incident page which should capture the date when the Incident was last marked as resolved. Please help me in this.

1 ACCEPTED SOLUTION

Harsh Vardhan
Giga Patron

Hi Manisha,



one quick question.


why do you need to capture the date in your last resolved field.


there is OOTB field "closed" you can use that field also to update the exact resolved time of your incident.


just you need to mention the condition in business rule.



current.closed_at = gs.nowDateTime();


below screenshot for your Resolved At field.



find_real_file.png


View solution in original post

25 REPLIES 25

I'm very new to Service now so please help me with this. can you say more clearly   please


Hi Manisha,



hope you are doing all these things on your personal development instance.


Create new business rule and . system Definition>> business rule>> create new one.



put this in condition field at script section.



current.state=='6' // i assumed the resolved value is 6 because in my instance it's 6.



script:



current.u_last_resolved=gs.nowDateTime();



if your query is resolved please mark correct and close this thread


let me know if you need any further help


HI Harsha vardhan,



I did same way, but nothing is capturing in that field. field is still empty. can you please help


can you please share the screenshot?


Thank you..It is working now...Thank you so much....I need only date not time. How can i do that now..?