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,8 @@
This piece of code is designed to fetch 'N' number of incidents that are most rcently created along with their Assigned status.
This helps to flag potential adherence issues which might lead to customer dissatisfaction.

What the code does:

1. Fetches the N number of most recently created incidents and prints their 'Number', 'Created' on value and 'Assigned to' status.
2. The incidents which are Assigned have a value of 'Assigned'.
3. The incidents which are Unassigned have a value of '**NOT Assigned**'.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
var inc = new GlideRecord('incident');
inc.orderByDesc('sys_created_on');
inc.setLimit(15);
inc.query();
gs.info('Below are the 15 most recently created incidents along with their Assigned status: ');
while (inc.next()) {
var assignedIncident = '';
if (inc.assigned_to) {
assignedIncidentStatus = 'Assigned';
} else {
assignedIncidentStatus = '**NOT Assigned**';
}
gs.info('Number: ' + inc.number + ', Created on: ' + inc.sys_created_on + ', ' + assignedIncidentStatus);
}
Loading