Skip to content
Merged
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,15 @@
(function() {
var priorities = {};
var agg = new GlideAggregate('incident');
agg.addAggregate('COUNT');
agg.groupBy('priority');
agg.query();
while (agg.next()) {
var priority = agg.getDisplayValue('priority') || 'No Priority Set';
var count = agg.getAggregate('COUNT');
priorities[priority] = parseInt(count, 10);
}
for (var priority in priorities) {
gs.info('Priority: ' + priority + ' | Count: ' + priorities[priority]);
}
})();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//To get the incident count based on priority.
Loading