
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2022 02:09 PM
We are looking to refine one of our VR assignment rules to take it a step further and not just assign to an assignment group, but also the assign it to the user contained in the assigned_to field on the CI record. Can anybody help me with the script necessary to accomplish this? We'd want to call out in the script assigning it to a specific group and then also assigning to the assigned_to if the field is not empty.
Solved! Go to Solution.
- Labels:
-
Vulnerability Response

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2022 02:12 PM
For the record, this is what ended up working:
current.assigned_to = current.cmdb_ci.assigned_to;
current.assignment_group = 'inserts sys ID here';

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2022 03:22 PM
Hi Sarah,
Try something like this.
var vul = new GlideRecord('sn_vul_vulnerability');
vul.addQuery('active=true');
vul.query();
while (vul.next())
{
var gr = new GlideRecord('cmdb_ci');
gr.addQuery('sn_vul_vulnerability',vul.getValue('sys_id'))
gr.query();
if (gr.next())
{
vul.assignment_group =<assignment group field name>;
vul.assigned_to = gr.<assigned to field name>;
vul.update();
}
}
Mark Correct or Helpful if it helps.
Thanks,
Yousaf
***Mark Correct or Helpful if it helps.***

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 03:30 PM
Thanks for your reply. I wasn't able to get this to work.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2022 03:27 PM
Harish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 03:30 PM
Thanks for your reply. I wasn't able to get this to work.