We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 599f55e commit 3fdfd05Copy full SHA for 3fdfd05
Server-Side Components/Background Scripts/Critical Incidents Created Today by assignment group/script.js
@@ -0,0 +1,17 @@
1
+//Count of Critical Incidents Created Today (by Assignment Group)
2
+(function() {
3
+ var ga = new GlideAggregate('incident');
4
+ ga.addQuery('priority', '1'); // Critical priority
5
+
6
+ var start = new GlideDateTime();
7
+ start.beginningOfToday(); // start of the day
8
+ ga.addQuery('sys_created_on', '>=', start);
9
+ ga.groupBy('assignment_group');
10
+ ga.addAggregate('COUNT');
11
+ ga.query();
12
13
+ gs.print("Critical Incidents Created Today (by Assignment Group):");
14
+ while (ga.next()) {
15
+ gs.print((ga.assignment_group.getDisplayValue() || "Unassigned") + " → " + ga.getAggregate('COUNT'));
16
+ }
17
+})();
0 commit comments