Configuration items have a Maintenance Schedule field (maintenance_schedule) that allows a Schedule (cmn_schedule) to be referenced that defines the number of times a change can be applied to the configuration item. The maintenance schedule defined in this field is not factored by the current implementation of Change Conflict Detector (Change Collision)

Steps to Reproduce

  1. Verify the setup for this procedure: you have demo data loaded on a fresh instance, anf the Java Application Server FLX configuration item has been defined with the Application FLX schedule.

  2. Configure a configuration item with a maintenance schedule defined in its maintenance_schedule field.

  3. Create a new Change Request, set the configuration item field to the newly created configuration item, and save the record

  4. Set the planned start/end dates to be outside of the maintenance schedule and save.

  5. Conflict detection should execute and set the Conflict status field.

  6. Check the Conflict tab on the Change Reques.t

    Note that there is no conflict for the associated CI with a reference to the Application FLX schedule, although one should be created to indicate that the Application FLX schedule is the reason why there is a conflict.


Modify ChangeCollisionHelper.isDateInCiMaintenanceWindows.

The following script is a guide to implementing this change and does not account for any existing customizations that might have already been applied.

The same sched object is instantiated, but the isValid function is used to validate the provided maintenanceWindow sys_id.

Replace the start of the function:

// Case1: maintenance window is null
if (JSUtil.nil(maintenanceWindow))
    return true;

// Case2: maintenance window is invalid
var record = new GlideRecord("cmn_schedule_maintenance");
record.addQuery("sys_id", maintenanceWindow + "");
if (!
    return true;

// Case3: check maintenance window
var sched = new GlideSchedule(maintenanceWindow);

With the following:

var sched = new GlideSchedule(maintenanceWindow);

// check maintenance window is valid
if (!sched.isValid())
    return true;
// check maintenance window

Related Problem: PRB1299045

Seen In

There is no data to report.

Intended Fix Version


Safe Harbor Statement

This "Intended Fix Version" information is meant to outline ServiceNow's general product direction and should not be relied upon in making a purchasing decision. The information provided here is for information purposes only and may not be incorporated into any contract. It is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. The development, release, and timing of any features or functionality described for our products remains at ServiceNow's sole discretion.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-08-27 17:13:18