Skip to content

Commit dd58520

Browse files
authored
Create get_orphaned_incidents.js
1 parent bfebf46 commit dd58520

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
var gr = new GlideRecord('incident');
2+
gr.addNullQuery('assigned_to');
3+
gr.addNullQuery('assignment_group');
4+
gr.addQuery('state', '!=', 7); // not closed
5+
gr.query();
6+
gs.info("Orphaned Incidents Count:"+gr.getRowCount());
7+
while (gr.next()) {
8+
gs.info('Orphaned incident: ' + gr.number + ' - ' + gr.short_description);
9+
}

0 commit comments

Comments
 (0)