How to remove affected CIs from current change record???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2020 10:08 AM
Hi All,
Business use case on change module
Currently I have "Affected CI" (task_ci) related list tab is available on change record, I will have to create new related list called "Exclusion Affected CIs"
Example : if fulfilment user removes few related list records from "Affected CIs" related list tab, I have to populate same related list records in the another "Exclusion Affected CIs" related list tab.
Purpose : For example user wants to schedule a patching for 10 servers initially when they submit change request but later they will exclude 5 servers from patching, in order to track/audit their current change schedule patching servers, they will look for excluded patching servers in the "Exclusion Affected CIs" related list tab.
How can we achieve above business use case, ?
do I need to create new custom table and name it as "Exclusion Affected CIs" related list tab?
If yes do I need to extend it from task_ci or cmdb_ci table?
do I create relationship called "Exclusion Affected CIs" related list?
Any thoughts or ideas are very much appreciated
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2020 01:20 PM
Hi Shantharao,
You're on the right track here. The 'Exclusion Affected CIs' will be best as a new custom table. A new custom relationship to the existing 'task_ci' table will not yield the required results. Once you have the new table, you'll want to set up a business rule to run on that table on insert of a new record to check the 'task_ci' table for that CI with that change record and remove the record if it's excluded.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2021 03:22 AM
Hi Shantharao,
There is a couple of solutions-
- You can have a checkbox on Affected CI table named "Excluded" to identify exclusion affected CI
- You can create new custom table as you have already planned
For both the cases, business rule needs to be configured on the affected CI table(task_ci)
condition: before delete
var exclusion_ci = new GlideRecord('task_ci');//or custom table name
exclusion_ci.initialize();
exclusion_ci.u_exclusion = true; // checkbox to identify exluded affected ci
exclusion_ci.ci_item = current.ci_item;
exclusion_ci.task = current.task;
exclusion_ci.insert();
Please mark correct if it's helpful
Thank you,
Jyoti