when remediation is completed on de duplicate task, which records gets updated with main CI

Abhiram8
Tera Contributor

Hi All

 

I am checking on remediating a duplicate task, when remediation is completed, duplicate CI gets updated with the main CI. So, now i want to understand on what kind of tasks, ci gets updated when remediation is completed? (like incident, problem, change, VIT)
Do we have list of tables where main ci gets updated and replaces with duplicate ci?

 

Thanks

Abhiram

6 REPLIES 6

Shivalika
Mega Sage

Hello @Abhiram8 

 

That's not how remediation works. 

 

When you choose a CI as main CI it means it has most number of attributes which are valuable to you or are correct and you want to keep it. And other CIs values are added or updated in the same main CI. 

 

So when you click on the remediate UI Action in the de-Duplication tasks. You have three things to handle - fields, related lists entries and relationships. You get option to choose in each of these things whether you want to update the main CI or you want to let it be as it is or you want to merge the additional properties from other CIs.

 

Next you choose what you want to do with the duplicate CIs or not so useful CIs. 

 

So basically this main CI is updated with everything important from other CIs and gets to retain its own important properties. 

 

Now if you talk about where this update reflects, it reflects everywhere the main CI is being used, since it's a reference field. 

 

You also have a whole template thing to automate this remediation process in CMDB workspace. I have additional CMDB Project that I have been working on for some time so these was a part of it. 

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY

Hi Shivalika

 

So, i understand the process of remediation. For suppose duplicate ci is referenced on multiple tasks like incident, request item, vulnerability items, change. So my question was, on what tasks this ci will be replaced with main ci, when remediation is completed?
One info we got from SN is, ide duplication is not supported on Vulnerability items. But when we checked for list of tables that de duplication supports and does not support, we didn't got much info.

 

Thanks

Abhiram

Hello @Abhiram8 

 

So in the remediation process - you have only two options to tackle the duplicate Ci - either you merge it with main CI - or you delete/deactivate it or any other update. 

 

There is no such option as managing the references of the duplicated CIs. You choose to merge the Related lists - in that case only related new related lists are brought. You need to do it manually or by script. 

 

This is the script we used for updating - 

 

var oldCI = 'sys_id_of_duplicate_CI'; // Replace with actual duplicate CI sys_id

var newCI = 'sys_id_of_main_CI'; // Replace with actual main CI sys_id

 

var tables = ['incident', 'change_request', 'problem', 'task_ci']; // Add more tables if needed

 

for (var i = 0; i < tables.length; i++) {

    var gr = new GlideRecord(tables[i]);

    gr.addQuery('cmdb_ci', oldCI);

    gr.query();

    while (gr.next()) {

        gr.cmdb_ci = newCI;

        gr.update();

    }

}

 

That's OOB behavior. 

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY

Hi Shivalika

 

Referenced tasks gets updated with main ci when de duplication task is remediated. OOB also it supports.


For example, take a closed incident record (inactive=false) which has a duplicate CI referenced on. Now go to de duplicate task of this CI and click on remediate. Either you merge the related lists/relations/set the attributes or delete duplicate ci. Now when remediation is completed - the duplicate ci is replaced with main ci on the incident record.
This is happening on incident table. This way, i want to understand what all tables SN is supporting such that old ci is replaced with main ci when de duplication is done.

 

Thanks

Abhiram