Customizing incident auto-closureDescriptionIn the base system, Incident Management automatically closes incidents 1 day after they have been resolved if no updates are made to the incident. This helps incident closure by automating the Resolved -> Closed state transition. If the record is updated on any field, then the 1 day counter is reset to the last updated timestamp. (Please note that Major Incidents are not part of auto-close functionality out-of-the-box.) Customizing auto-closure There are several ways the auto-close behavior can be modified. For any of these modifications, an admin role is necessary: Turning Auto-Closure offChanging the number of days to wait before closing the incidentChanging the frequency at which the system checks on the resolved incidents to close them (default is hourly)Set a specific user as the Updated by on the incident recordHook in other changes on the incident record at the time of closure (for example, add notes in Work notes) Turning auto-closure off Navigate to System Properties > System.Locate the property Number of days (integer) after which Resolved incidents are automatically closed.Set the Value to 0. Changing the number of days to wait before closing the incident Navigate to System Properties > System.Locate the property Number of days (integer) after which Resolved incidents are automatically closed.Set the Value to be the number of days to wait before closing a resolved incident. For example, if you want to wait a week before closing the incident, set the value to 7 days. Changing the frequency at which the system checks on the resolved incidents to close them Navigate to System Scheduler > Scheduled Jobs > Today's Scheduled Jobs.Locate the record named Autoclose Incidents.This job runs every hour. If there are any new incidents that have gone past the 1 day in Resolved state in that last hour, the incidents are updated.Update the Repeat time to change this to run at a different frequency. If there is a time of the day you would like it to run, change the Trigger Type to be Daily and set a specific time. Set a specific user as the Updated by on the incident record Navigate to System Scheduler > Scheduled Jobs > Today's Scheduled Jobs.Locate the record named Autoclose Incidents.In the Job content, add the following line above the scScriptName:fcRunAs=itil(The underlined text must be a valid user_id.)This ensures all incidents closed as a result of this script are recorded as being updated by ITIL users. You can set this to be any user in your system. Hook in other changes on the incident record at the time of closure Navigate to System Definition > Business Rules.Locate the record named Incident autoclose.In the Advanced section, the script field contains the code that runs on every incident closed using this feature. This is where additional changes can be made to the incident record. For example, add a comment in the comments section of the incident documenting the auto-closure. See the commented lines below for an example of adding info in the comments field. Note: If you edit the script, the script is excluded from future upgrades. Technical components of incident auto-close Note: This section contains advanced user information. Please try the customizations explained in the section above if you are not an advanced user. There are 3 pieces of configuration points that make up the auto-close behavior: Property, Business Rule, and Scheduled Job. Property The property glide.ui.autoclose.time is used to determine the number of days after a "silent" resolved incident is closed. A "silent" record is a record that has not been updated on any fields. Any update resets the record so that its auto-closure is measured from the last updated timestamp. This record is located at /sys_properties.do?sys_id=d5c26446c0a8011800cdf450892cec2d. Business Rule Incident autoclose contains all the code necessary to do the closure. This includes the query for all the incidents in resolved state and a query of all incidents that have not been updated for longer than the "autoclose days." The business rule also sets a few values: The value in closed_by field to be the same as resolved_byValue in the state field to be closedActive to be set to false This record is located at /sys_script.do?sys_id=d67b8d9ec0a80118008cd8f0f7f92fae. Scheduled job Autoclose Incidents calls the business rule every hour to actively search for "silent" resolved incidents. The job is auto-queued to run every hour by default. This job is normally quite quick and does not create excessive strain on the instance. If you have an extremely high volume of incidents being moved into the resolved state, then you may change this to run at a lower frequency or even once a day only. This record is located at /sys_trigger.do?sys_id=d67e98dac0a8011801393f5054790aa5.