Skip to content

Commit baba67c

Browse files
Bulk resolve older incidents (#1973)
* Create Bulk Resolve script.js Added background script * Create README.md
1 parent 7661a0a commit baba67c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Use this script in background scripts to Bulk Close Older Incidents. Example mentioned in the script has 'Created 1 year ago' filter which can be updated as required.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
var incGr = new GlideRecord('incident');
2+
incGr.addActiveQuery();
3+
incGr.addEncodedQuery("sys_created_onRELATIVELT@year@ago@1"); //Created 1 year ago. Update query as required.
4+
incGr.query();
5+
while(incGr.next())
6+
{
7+
incGr.state = 6;
8+
incGr.close_code = 'No resolution provided';
9+
incGr.close_notes = 'Bulk Closing Old Incidents';
10+
incGr.update();
11+
}

0 commit comments

Comments
 (0)