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,5 @@
# ServiceNow Background Script – Find Orphaned Incidents

## 🧩 Overview
This background script identifies **orphaned incident records** — incidents that are not assigned to any **user** or **assignment group** and are still open.
It’s useful for **data quality audits**, **queue management**, and **incident triage improvement**.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
var gr = new GlideRecord('incident');
gr.addNullQuery('assigned_to');
gr.addNullQuery('assignment_group');
gr.addQuery('state', '!=', 7); // not closed
gr.query();
gs.info("Orphaned Incidents Count:"+gr.getRowCount());
while (gr.next()) {
gs.info('Orphaned incident: ' + gr.number + ' - ' + gr.short_description);
}
Loading