Impacted Services/CI related list in Change record not populating data for STD CHG. But data being populated for Normal CHG.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2022 11:03 PM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2022 01:53 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2022 03:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-03-2022 05:27 AM
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