Skip to content

Commit f75160f

Browse files
Create readme.md
1 parent 2c89449 commit f75160f

File tree

1 file changed

+39
-0
lines changed
  • Server-Side Components/Background Scripts/ Bulk Change of Incident Priority Based on Category

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Bulk Incident Priority Updater
2+
Overview
3+
4+
This ServiceNow background script automatically updates the priority of multiple incidents based on their category.
5+
It helps administrators and developers maintain consistent priority levels aligned with business rules — without manual updates.
6+
7+
Use Case
8+
9+
Here’s how it works:
10+
11+
Incidents under the Network category are set to Priority 1 (Critical)
12+
13+
Incidents under Application are set to Priority 2 (High)
14+
15+
Incidents under Hardware are set to Priority 3 (Moderate)
16+
17+
This approach saves time and ensures priority values remain standardized across the platform.
18+
19+
Script Details
20+
Field Value
21+
Table incident
22+
Type Background Script
23+
Author Sachin Narayanasamy
24+
Language JavaScript (GlideRecord)
25+
Logic Flow
26+
27+
Define a category-to-priority mapping inside the script.
28+
29+
Query all active incidents in the system.
30+
31+
For each incident:
32+
33+
Retrieve its category.
34+
35+
If the category exists in the mapping and the current priority is different, update the record.
36+
37+
Log updates for each incident with its number and new priority.
38+
39+
Display a summary showing how many incidents were updated and skipped.

0 commit comments

Comments
 (0)