Bulk change VIT state from Under Investigation to Open

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2024 06:43 AM
Hello, we have an issue where we had deleted several Remediation Tasks and it has left a large number of VIT's in an Under Investigation state. Because of that Assignment Rules will not apply to the VIT's. Is there a way to change the state of a VIT in bulk to Open from Under Investigation? We have tried a new Remediation Task with a state of Open and then Closed-Cancelled it and that does not seem to work. Any advice would be appreciated!
- Labels:
-
Vulnerability Response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2024 07:59 AM
Hi Tom, have you looked at those VITs via a List View? There should be a Bulk Edit UI Action that can bulk-update a set of VITs (1,000 at a time if they are not corrupted). Docs: https://docs.servicenow.com/bundle/washingtondc-security-management/page/product/vulnerability-respo...
If those are not available for any reason for Bulk Edit, then you may need to create a background/fix script to correct the record states.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2024 02:45 AM
You can use the bulk edit button on the vulnerable item list view to change the state from "Under Investigation" to "Open." This action will only update the state for those Vulnerable Items assigned to you. Here is a screenshot for reference.
Background Script:
Additionally, you can use a background script to update the state as well. this takes all the records in consideration. please execute the below script. this will bring all the records to Open state.
var gr = new GlideRecord('sn_vul_vulnerable_item');
gr.addQuery('state', '2'); //query under investigation Record
gr.query();
if (gr.next()) {
gr.setValue('state', '1'); // Set the state field to '1' for Open State
gr.update(); // Save the changes to the record
}
Happy Learning
…………………………………………..
Mark it helpful 👍and Accept Solution ✅!! If this helps you to understand.