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 1968389 commit df745e6Copy full SHA for df745e6
Server-Side Components/Background Scripts/Get incident count based on priority/Incident Count on Priority Script.js
@@ -0,0 +1,16 @@
1
+ var gr = new GlideRecord('incident');
2
+ gr.query();
3
+
4
+ var priorities = {};
5
6
+ while (gr.next()) {
7
+ var priority = gr.getDisplayValue('priority') || 'No Priority Set';
8
+ if (!priorities[priority]) {
9
+ priorities[priority] = 0;
10
+ }
11
+ priorities[priority]++;
12
13
14
+ for (var p in priorities) {
15
+ gs.info('Priority: ' + p + ' | Count: ' + priorities[p]);
16
0 commit comments