Skip to content

Commit 3de7a0b

Browse files
Create EscalateIncidents.js
Escalate high priority incidents and automate notifications
1 parent a79b508 commit 3de7a0b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Hours - set hours in a system property, and call below function to escalate
2+
// Support it with the events and notifications
3+
4+
function escalateHighPriorityCases(hours) {
5+
var gr = new GlideRecord('incident');
6+
gr.addQuery('priority', '1 - Critical');
7+
gr.addQuery('opened_at', '<=', gs.hoursAgo(hours));
8+
gr.query();
9+
10+
while (gr.next()) {
11+
gs.eventQueue('incident.escalation', gr, gr.assigned_to, 'Escalation triggered after ' + hours + ' hours.');
12+
}
13+
}

0 commit comments

Comments
 (0)