Cancelling an incident

John Vo1
Tera Guru

When I cancelled an incident it marks the Closed field at 11/26/2019.

find_real_file.png

 

So if I reopen that incident the Closed info is still showing 11/26/2019 and when I actually close out the incident it will still show the same 11/26/2019.  So now if managers what to run reports on that the time and dates will not be correct.  So how do I get it to where when it's cancelled the Closed field is not populated?

1 ACCEPTED SOLUTION

Try with this code:

if (current.closed_at.nil() && current.incident_state == IncidentState.CLOSED)
		current.closed_at = gs.nowDateTime();

Basically it will populated the Closed date/time field only in case of Incident closure and NOT in case of Incident cancellation.

If I have answered your question, please mark my response as correct and/or helpful.

Thank you very much

Cheers
Alberto

View solution in original post

12 REPLIES 12

We have techs here that set the incident to cancelled and then reassigning it to themselves after cancelling it.

Umm...ok is that, like, a process you're happy with? Why are they cancelling it? Does that not mess with the SLA's? Seems like an odd Incident management process...

reddynikitavaik
Tera Contributor

Hi guys,

Can you please help me with the script of cancelling a incident without a button

Thank you in advance

Regards,

Reddy Nikita Vaikar.