Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Background script to get Count of Critical Incidents Created Today (by Assignment Group)
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//Count of Critical Incidents Created Today (by Assignment Group)
(function() {
var ga = new GlideAggregate('incident');
ga.addQuery('priority', '1'); // Critical priority

var start = new GlideDateTime();
start.beginningOfToday(); // start of the day
ga.addQuery('sys_created_on', '>=', start);
ga.groupBy('assignment_group');
ga.addAggregate('COUNT');
ga.query();

gs.print("Critical Incidents Created Today (by Assignment Group):");
while (ga.next()) {
gs.print((ga.assignment_group.getDisplayValue() || "Unassigned") + " → " + ga.getAggregate('COUNT'));
}
})();
Loading