- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks 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:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Got some help from someone who knew someone, and he figured out it was Timezone related. Here's the "fixed" script, in case it helps anyone else.
Client Callable Script Include:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks 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';
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi, Rafeal.
That worked once, so I showed it to the colleague who reported the issue, and it went back to doing the everything is false again. It flips the flag to false as soon as end_date is selected.
Are there other things I need to check besides the Script Include, Client Script, and Schedule?
Thanks!
Esther
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Got some help from someone who knew someone, and he figured out it was Timezone related. Here's the "fixed" script, in case it helps anyone else.
Client Callable Script Include: