The CreatorCon Call for Content is officially open! Get started here.

Impacted Services/CI related list in Change record not populating data for STD CHG. But data being populated for Normal CHG.

Kingstan M
Kilo Sage

Hello Team,

Impacted Services/CI related list in Change record not populating data for STD CHG. But data being populated for Normal CHG.

Please educate to fix this?

3 REPLIES 3

Mahak2
Kilo Guru

Hello

Suggested Steps:

1. Add Affected CI Related List to the Standard Change Proposal 

2. Add your Affected CIs to that list

3. Write a Business Rule (After Insert of a Standard Change) on the Change Request table (see below)

 

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

//Add function to include Affected CIs
var stdP = new GlideRecord('std_change_proposal');
		if(stdP.get('sys_id', current.std_change_producer_version.std_change_proposal)){
var affCI = new GlideRecord('task_ci');
	affCI.addQuery('task',stdP.sys_id);
	affCI.addNotNullQuery('ci_item');
	affCI.query();
	while(affCI.next()){
	var	taffCI = new GlideRecord('task_ci');
		taffCI.initialize();
		taffCI.task = current.sys_id;
		taffCI.ci_item = affCI.ci_item;
		taffCI.insert();
	}
		}
})(current, previous);

Please try this and let me know if this works.

Mark ✅ Correct if this solves your issue and also mark Helpful if you find my response helped you in any way.

Thanks

Well, Thanks for your response.

We are talking about Impacted Services/Cis (task_cmdb_ci_service). Is it?

 

Because the affected CI are populating but not the Impacted Services/Cis for STD CHG. Please see below.

find_real_file.png

find_real_file.png

Hello ,

I checked on my PdI. By default we can add the cis here by clicking on add button.

Also which data you are talking about , can you please explain?

 

Thanks