- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2016 11:50 AM
I'm trying to create an Off Hours Incident Report capturing tickets logged during our specific off hours time range of 4:00pm (CST) and 7:00am(CST) along with selecting the filter 'Off Hours is True'. Currently on Fuji release and not having any luck being able to filter down to our specific off hours to ensure I'm not missing any tickets where the 'Off Hours' box was missed being checked. Thank you, Patti
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2016 11:58 AM
Hi Patti,
If I understand right, you want to list incidents that were opened/created between those hours.
It also sounds like there is some sort of checkbox that is maintained (by a business rule perhaps, or manually) that you can report against.
If that's the case, your report might look something like this:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2016 12:36 PM
Hopefully I've provided an answer for you in this thread somewhere. If you would be so kind as to mark one of the earlier comments as correct, it will indicate to others perhaps looking for a similar answer that we found you a solution. We can still continue to comment on this thread if you have specifics around this particular solution.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2016 01:20 PM
Hi Chuck,
FYI — I will need to include the "Off Hours is True" to capture incidents where the off hours check box is checked for my report as we have tickets logged during the day for events that happened after hours for which we have received email notifications on or called on. Our support desk is not manned after core business hours.
~ Working in Dev right now
Thank you,
Patti Mayers

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2016 01:27 PM
Yes Patti.
Your condition/filter on that report will look something like:
Created on or after yesterday
Off Hours is true
I'm glad I'm not a gambling man, because I could have sworn there was a 'last 24 hours' in there somewhere. If there was, I didn't see it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2016 06:11 AM
Hi Chuck,
I love this answer, this is exactly what I want to do! What would the business rule script look like for "when to run"? I want to check an "after hours" box on every incident that is opened between 9PM and 7AM M-F + weekends, select holidays as well (ideally).
Also how would you check the box for all the incident records in the past?
Thank you for your advice!
Tyler

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2016 06:16 AM
Hi Tyler,
Unfortunately I don't have time to write the entire script. Your script will have to parse the current.opened_by date. Since it is a GlideDateTime field, you can use the methods defined in the link below to get the day of the week. You may have to break out the time to get the hours of the day. Once you know it is "in range", you can set the flag and update the records.
To update previous records, basically use the same script, but instead of using current, you query for all records and run it from scripts background or a fix script.
Docs: GlideDateTime