Skip to content

Commit 22e53b1

Browse files
Update README.md
1 parent 2818221 commit 22e53b1

File tree

1 file changed

+9
-34
lines changed
  • Specialized Areas/CMDB/CMDB CI Deduplication Task Generator

1 file changed

+9
-34
lines changed
Lines changed: 9 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,22 @@
11
# CI Deduplication Task Generator
22

3-
This script rechecks the cmdb_ci_hardware table for duplicates by serial number and creates a De-Duplication Task if needed (for records that didn't run through the IRE).
3+
This repository contains a ServiceNow customization that enables users to create De-Duplicate Tasks for selected Configuration Items (CIs) directly from a list view using a UI Action.
44

5-
### How It Works
6-
7-
1. Finds all serial numbers that are used on more than one hardware CI.
5+
When executed, the UI Action confirms the number of selected CIs, calls a Script Include via GlideAjax, and creates a Remediate Duplicate Task using CMDBDuplicateTaskUtils
86

9-
2. For each group of duplicates, it checks if any of the CIs are already part of an open de-duplication task.
7+
### How It Works
108

11-
3. If no open task exists, it creates a new one linking all CIs in the group.
9+
* Allows users to select multiple CIs and trigger de-duplication in one click
10+
* Automatically creates a De-Duplicate Task record using backend logic
11+
* Displays confirmation dialogs for task creation and redirection
12+
* Prevents duplicate task creation for CIs already linked to an open task
13+
* Redirects to the created De-Duplicate Task record for quick review
1214

13-
4. Logs a summary of actions taken (tasks created, groups skipped).
1415

1516
### Dependencies
1617

1718
This script requires the `global.CMDBDuplicateTaskUtils` Script Include to be active in your instance.
1819

1920
### Configuration & Use
2021

21-
This script is meant to be run as a **Scheduled Job** or as a **Background Script**.
22-
23-
Before you run it, you must set the target table.
24-
25-
```
26-
// Change this line in the script!
27-
var ciTable = "cmdb_ci_hardware"
28-
29-
30-
```
31-
32-
Change `"cmdb_ci_hardware"` to the table you want to run the script against.
33-
34-
### Example Log Output
35-
36-
```
37-
Starting check for duplicate CIs by serial number...
38-
==> Successfully created task RITM0010123 for Serial Number "VMW-50-81-7A-C9-23-44".
39-
--> Skipping Serial Number "SGH814X025". It is already part of an open task.
40-
--- Re-check Complete ---
41-
Total Duplicate Groups Found: 2
42-
New Remediation Tasks Created: 1
43-
Groups Skipped (Already in an open task): 1
44-
--------------------------
45-
46-
47-
```
22+
Creation of UI Action and asking confirmation of selected Records from List View by using GlideAjax

0 commit comments

Comments
 (0)