ticket should close automatically after 30days from the day the status change to resolved
i want the incident ticket to close automatically after 30days from the day the status changes to resolved.
Please help me with this
Re: ticket should close automatically after 30days from the day the status change to resolved
We wrote a script in the ScriptLibrary to do this, except for 7 days. And a scehdule record that kicks off every night to check if the Inicdent has been resolved for at least 7 days. When the schedule record sees the incident has been resolved for 7 days then the script kicks in and closes the incident.
And then in Scriptlibrary we have a script called AutoCloseIncident that has this function:
var ticket = new SCFile("probsummary");
var rc = ticket.doSelect("problem.status=\"Resolved\" and resolved.time<tod() - '7 00:00:00'");
if (rc == RC_SUCCESS)
//ticket.resolution_code = "Automatically Closed";
} while (ticket.getNext() == RC_SUCCESS);
*** If you do this, you will need to think about incident tasks. I have another post from the past couple days where I talked about our incidents were able to be resolved with open tasks. So here is another thread you may want to look at: