- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2022 02:22 AM
I want to get a list of all the affected CI for a particular Change Request using script. In the below screenshot, I need to get the list of affected CI (here ANNIE-IBM and JON-IBM) for the change request CHG0040007. How can I get these using glide/script?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2022 02:58 AM
Hello
Use the below script
var grTaskCi = new GlideRecord('task_ci');
grTaskCi.addEncodedQuery("task=d71a36101b4185106c080e1dcd4bcb3c"); //sys id of change
grTaskCi.query();
while (grTaskCi.next()) {
gs.info('ci_item: ' + grTaskCi.getValue('ci_item'));
}
Hope it helps.
Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg
Regards
Sulabh Garg

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2022 02:58 AM
Hello
Use the below script
var grTaskCi = new GlideRecord('task_ci');
grTaskCi.addEncodedQuery("task=d71a36101b4185106c080e1dcd4bcb3c"); //sys id of change
grTaskCi.query();
while (grTaskCi.next()) {
gs.info('ci_item: ' + grTaskCi.getValue('ci_item'));
}
Hope it helps.
Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg
Regards
Sulabh Garg