From 3fdfd0542040c24b3086ca02fc2cf31014eea836 Mon Sep 17 00:00:00 2001 From: Indra-kolge <123245160+Indra-kolge@users.noreply.github.com> Date: Sat, 18 Oct 2025 13:53:52 +0530 Subject: [PATCH 1/2] script.js --- .../script.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Server-Side Components/Background Scripts/Critical Incidents Created Today by assignment group/script.js diff --git a/Server-Side Components/Background Scripts/Critical Incidents Created Today by assignment group/script.js b/Server-Side Components/Background Scripts/Critical Incidents Created Today by assignment group/script.js new file mode 100644 index 0000000000..ca8a095f13 --- /dev/null +++ b/Server-Side Components/Background Scripts/Critical Incidents Created Today by assignment group/script.js @@ -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')); + } +})(); From adda258f910660666588f7e1804d3a41c45a21de Mon Sep 17 00:00:00 2001 From: Indra-kolge <123245160+Indra-kolge@users.noreply.github.com> Date: Sat, 18 Oct 2025 13:54:29 +0530 Subject: [PATCH 2/2] README.md --- .../README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 Server-Side Components/Background Scripts/Critical Incidents Created Today by assignment group/README.md diff --git a/Server-Side Components/Background Scripts/Critical Incidents Created Today by assignment group/README.md b/Server-Side Components/Background Scripts/Critical Incidents Created Today by assignment group/README.md new file mode 100644 index 0000000000..1033acbf30 --- /dev/null +++ b/Server-Side Components/Background Scripts/Critical Incidents Created Today by assignment group/README.md @@ -0,0 +1 @@ +Background script to get Count of Critical Incidents Created Today (by Assignment Group)