- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
7 hours ago
Hi there,
With the ServiceNow Brazil release, a small but interesting change has been introduced to Incident Management. Resolved Incidents are now automatically closed after a configured number of business days instead of calendar days.
Sounds like a straightforward improvement, right? But how does this actually work behind the scenes? And what if your organization uses a different business schedule, isn't ready for this change, or has customized the existing auto-close logic?
Let's have a closer look!
Incident Auto-Close
Out-of-the-box, ServiceNow uses the "Autoclose Incidents" Schedule Item [sys_trigger] to automatically close resolved Incidents. This job runs every hour and executes the "incident autoclose" Business Rule [sys_script]. The number of days before an incident is automatically closed is controlled through the "glide.ui.autoclose.time" System Property.
Previously, this referred calendar days. Starting with Brazil, those days are calculated as business days instead. The change is entirely within the Business Rule, together with a newly introduced Schedule. The Schedule Item itself hasn't changed.
Business Rule
The real change is in the existing incident autoclose Business Rule. The updated script now loads a newly introduced Schedule using the GlideSchedule API.
Instead of simply calculating elapsed calendar days, the updated logic uses the schedule to account for business time. For example, with auto-close configured to three days, a weekend no longer counts toward those three days.
Schedule
ServiceNow introduced a new Schedule [cmn_schedule] called "24 hours on weekdays". This Schedule runs from Monday through Friday, 00:00:00 through 23:59:59. There's one important detail though: there are no holidays attached to this Schedule! So, even if Christmas Day or another public holiday falls on a weekday, it still counts as a business day. Something worth knowing if your organization expects business days to exclude public holidays.
One thing that immediately caught my attention is that ServiceNow has hardcoded the sys_id of the Schedule directly into the Business Rule. Why not make this configurable through a System Property? Many organizations already maintain their own business schedules, including public holidays and company-specific non-working days. Unfortunately, the new implementation doesn't provide an out-of-the-box configuration option to select one of those schedules. Of course, you could customize the Business Rule to reference another Schedule. But that introduces another customization to maintain during future upgrades. A configurable Schedule would have made this feature much more flexible!
Upgrade to Brazil
If the incident autoclose Business Rule hasn't been customized on your instance, it will automatically be updated when upgrading to the Brazil release. Else, you will encounter a Skipped Record that needs to be handled. Without the updated Business Rule, the switch from calendar days to business days will not take effect on your instance.
What if - for whatever reason - you don't want this change in behavior (yet) while upgrading to Brazil? One option to influence the new business day calculation is to modify the new Schedule. Another option is to customize the Business Rule.
---
That's it. Hope you like it. If any questions or remarks, let me know!
| C |
If this content helped you, I would appreciate it if you hit bookmark or mark it as helpful.
Interested in more Articles, Blogs, Videos, Podcasts, Share projects I shared/participated in? |
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
11x ServiceNow MVP
---
