Confirming date is within maintenance window
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
I have a catalog item for an end-user to request a change request. I'm trying to validate that the dates they provide are within a Schedule named "Data Center Maintenance", both start and end dates. This Schedule has a single Schedule Entry of every Sunday from 3am-11am, and no Child Schedules. All users and the system have the same date format. in_maintenance_window is always evaluating as false. Any hints on where I'm going wrong would be appreciated. Any suggestions for a cleaner way to do this would be appreciated. (Users can still submit their request outside the maintenance window, but in_maintenance_window = false triggers other required approvals.)
I have a Client Callable Script Include:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
hi @EstherJ
Please, change this part
if (sched.appliesRange(startDT,endDT)) {
return 'true';
}
To this one
if (sched.isInSchedule(startDT) && sched.isInSchedule(endDT)) {
return 'true';
}