Exclude standard changes from Maintenance Window

taddparris
Kilo Expert

Not sure how to ask this question so best I can do is explain what is happening and why I want to change it.   We are upgrading to Helsinki and are planning on utilizing the new automated collision detection.   This comes with a Conflict Status field and an embedded list of any conflicts found.   What we are realizing is, Standard Changes are being shown as a conflict for the CI being outside the Maintenance Window and could confuse our users.   We made a decision in the past that Standard Changes can be done at anytime with no regard to the maintenance window because they are so low risk, low impact, and history of success.   Our goal is to find a way to not have conflict detection check the maintenance window if the change type is Standard.   Are only other   option is to hide the Conflict Status and embedded list is the type is Standard.   This last resort option would hide all conflicts which is fine, but could hold value for other conflicts.

Here is the Conflict Status field

find_real_file.png

Here is the embedded list

find_real_file.png

I think my question is:   Where can I find the properties for when to check a Change against the Maintenance Window, and can we have it bypass that check if the type is Standard?

Thanks in advance for any feedback

8 REPLIES 8

chrishenson
ServiceNow Employee
ServiceNow Employee

Hello Tadd,



You can do this by overloading the _getChangesWithCommonCIs function from the ChangeCheckConflictsSNC script include.



Copy the function from the SNC script include into the ChangeCheckConflicts script include, pasting it just below the initialize method.   This will cause Conflict Detection to use the overloaded method rather than the SNC class variant.



In the copied function add the following lines of code:



Just below the changeRequestGR.addActiveQuery() around line 71


changeRequestGR.addQuery("type","!=","standard");



Just below the changeRequestGR2.addQuery for cmdb_ci IN ids around line 81


  changeRequestGR2.addQuery("type","!=","standard");



This will prevent standard type change requests from being considered in conflict detection.



This code is provided 'as-is' and should be tested thoroughly before being added to a production system.   Making this change will be seen as a customization of the conflict detection feature.



Hope that points you in the right direction.



Regards,



Chris Henson


hi @chrishenson 

 

i see this script include as read only and i am unable to edit the script , is there any way to edit this one to active the requirement. 

Hello,

 

Which of the scripts mentioned are you seeing as read only?

Hi @chrishenson 

ChangeCheckConflictsSNC script include. this one is read only and it shows as below

konijetisumanth_0-1714751759827.png