- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2022 07:53 AM
Hi,
We have issue with business rule of Auto Closer of Closed incident after 5 Business days.
Incident state doesn't change from Resolved to Closed after 5 days.We have bulk of tickets which is already in Resolved however those are not getting auto close after 5 days according to out of box business rule.
Can some please suggest on work around Need Fix Script OR background script to close the Incident which is already Resolved State.
Thanks,
Shekhar,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2022 08:42 AM
Please use below Fix script/ background script to change the state from resolved to closed
closeIncidents();
function closeIncidents() {
var gr = new GlideRecord("incident");
gr.addEncodedQuery("stateIN6");
gr.setWorkflow(false);
gr.query();
while (gr.next()) {
gr.state = 7;
gr.close_notes = "Manually closing ticket from resolved state";
gr.update();
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2022 08:42 AM
Please use below Fix script/ background script to change the state from resolved to closed
closeIncidents();
function closeIncidents() {
var gr = new GlideRecord("incident");
gr.addEncodedQuery("stateIN6");
gr.setWorkflow(false);
gr.query();
while (gr.next()) {
gr.state = 7;
gr.close_notes = "Manually closing ticket from resolved state";
gr.update();
}
}