Last active
April 7, 2023 23:06
-
-
Save cmcdevitt/410281d5d209dbb44f93abf6c7a2bf8b to your computer and use it in GitHub Desktop.
When a Vulnerable Item is reopened check if it is deferred first
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| A VR scanner may "reopen" a "closed" VIT that has an Active Deferral... so stop that from happening | |
| BR on sn_vul_vulnerable_item | |
| When: Before - Update | |
| Condition: State changes to Open | |
| */ | |
| var date = new GlideDate(); | |
| var current_date = date.getByFormat('yyyy-MM-dd'); | |
| //This is a 'light' check | |
| if(current.ignore_expiration >= current_date){ | |
| current.setValue('state', 12); | |
| current.work_notes = "The state was set to Deferred becouse there is an active Deferral"; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment