Business rule
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2025 01:31 AM
Create BR for when a VIT/AVIT/CVIT get's reassigned from one of the groups mentioned below to another group. The Due Date field get's updated based on the risk rating and whether it's internet facing or not. The Due Date field will add the relevant amount of days to the date of the reassignment and apply
Risk Rating | Configuration Item.Internet Facing | Due Date |
Critical | Yes | 30 |
High | Yes | 30 |
Medium | Yes | 60 |
Critical | No | 60 |
High | No | 60 |
Medium | No | 90 |
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2025 12:13 AM
Hi @Bhavani1995
// Define variables for risk rating and internet-facing status
var dueDateDays;
// Check the risk rating and internet-facing status
if (current.risk_rating == 'Critical') {
if (current.internet_facing == 'Yes') {
dueDateDays = 30;
} else {
dueDateDays = 60;
}
} else if (current.risk_rating == 'High') {
if (current.internet_facing == 'Yes') {
dueDateDays = 30;
} else {
dueDateDays = 60;
}
} else if (current.risk_rating == 'Medium') {
if (current.internet_facing == 'Yes') {
dueDateDays = 60;
} else {
dueDateDays = 90;
}
}
// Update the Due Date field based on the calculated days
if (dueDateDays) {
var reassignmentDate = new GlideDateTime(); // Get current date/time
reassignmentDate.addDays(dueDateDays); // Add the calculated days
current.due_date = reassignmentDate; // Set the new Due Date
}
Thanks & Regards
Deepak Sharma