Remove duplicate CI group approvals
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2024 08:46 AM
Hi All,
As part of our change request form, we allow selecting multiple CI's using a list field.
We've recently been asked to start having approvals raised for each ci selected in this list field.
I've create a script in our workflow to raise approvals for each CI but we're finding this might involve multiple approvals raised for the same group.
Does anyone have any ideas on how to remove these duplicates and leave just the one?
Script below, Cheers all!
(Approval Group)
if (!gs.nil(current.u_configuration_items)) {
var configitems = new GlideRecord('cmdb_ci');
configitems.addQuery('sys_id', 'IN', current.getValue('u_configuration_items'));
configitems.query();
while (configitems.next())
answer.push(configitems.getValue('technical_approval_group'));
Labels:
- Labels:
-
Workflow Automation
0 REPLIES 0