Parent Child Relationship for changing assignment group.

Chetan Lokhande
Kilo Explorer

I want to establish Connection between parent incident and child incident such that if I change the Assignment group of parent then it will change the assignment group of child incident as well keeping the parent child relationship active.

Thanks,
Chetan

3 REPLIES 3

Community Alums
Not applicable

Hi Chetan

You can add this logic in a similar way to the out-of-the-box business rule called Update Child Incidents

Thanks
Mike

The Machine
Kilo Sage

I've personally been always against doing this.  If you have a broad system like Active Directory and several applications that depend on AD.  Changing all of the child incidents loses the visibility of the true impact of the major incident.  i.e, by Application/Service, Group.

It can be done, but I'd advise against it if it were me.

Tanaji Patil
Tera Guru

You need to write a business rule as below-

Name: Update Child Incident Assignment Group
Active: true
When: async
Order: 100
Update: true
Filter Conditions: Assignment group change AND Child Incidents is not 0
Advanced: true
Script:

(function executeRule(current, previous /*null when async*/) {

	var grIncident = new GlideRecord("incident");
	grIncident.addActiveQuery();
	grIncident.addQuery("parent_incident", current.sys_id+"");
	grIncident.setValue("assignment_group", current.assignment_group+"");
	grIncident.setValue("assigned_to", current.assigned_to+""); // In case you want assinment group emty then comment this and uncomment below line
	// grIncident.setValue("assigned_to", "");
	grIncident.updateMultiple();

})(current, previous);

*please check the comment specified inline

 

In case you also want to change the assignment group automatically when a new child incident is added under a change then also add this BR-
Name: Update Assignment Group from Parent
Active: true
When: before
Order: 1000
Insert: true
Update: true
Filter ConditionsParent Incident is not empty
Advanced: true
Script:

(function executeRule(current, previous /*null when async*/) {

	current.assignment_group = current.parent_incident.assignment_group;
	current.assigned_to = current.parent_incident.assigned_to; // In case you want assinment group emty then comment this and uncomment below line
	// current.assigned_to = "";

})(current, previous);

*please check the comment specified inline

 

-Tanaji
Please mark reply correct/helpful if applicable