Check Conflicts Customization
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2016 10:53 AM
I am trying to get my conflict checker to check against already scheduled changes. I know there is an option but since the Planned Start/End Dates are set to Date/Time, a change has to be at the same EXACT time to throw a conflict. Here is what I'm asking:
1) Is there a way to change that field type to just date? I've tried but there is no option for just DATE in the Configure Dictionary menu.
2) Can I make it so that if I schedule a change for 11/20 - 11/22 and another for 11/19-11/23, a conflict will show up in the table? I basically want a conflict thrown every time two changes overlap in some capacity.
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2016 01:23 PM
Change > Administration > Conflict Properties, there is an option:
Is that checked? Detect change conflicts automatically
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2016 01:55 PM
Yes this is checked. Does not throw a conflict for being scheduled at the same time as another change (not the same CI, just another change). I'm looking for a conflict to display when any other change to any other CI on the day that I'm trying to schedule my change. Current functionality appears to only sho conflicts that exist for the same CI.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2017 06:43 AM
Hi Matt,
I recently had the same requirement in Change Management - to show all other Change Requests scheduled for the same time regardless of the CI on the Change and what's listed in Affected CI's. I saw your thread when I was looking for ideas, and I've come up with the following:
I created a new Defined Related List in System Definition - Relationships using some of the code from the ChangeCollisionHelper Script Include. This seems to work great, but haven't put it through UAT yet. Here is the code if you want to try the same:
Applies to table: Change Request
Queries from table: Change Request
Query with:
var changeRequestGR = new GlideRecord('change_request');
addQueryDateRange(changeRequestGR, parent.start_date, parent.end_date);
changeRequestGR.addQuery('sys_id','!=',parent.sys_id);
changeRequestGR.addQuery('state','IN','8,9,10,15,11,12,13'); //Only return Change Requests in open states
changeRequestGR.query();
var cr_ids = [];
while (changeRequestGR.next()) {
cr_ids.push('' + changeRequestGR.sys_id);
}
current.addQuery('sys_id','IN',cr_ids);
function addQueryDateRange(gr, startDate, endDate) {
var queryCondition = gr.addQuery('start_date', '9999-12-31 23:59:59');
var startDateQueryCondition = queryCondition.addOrCondition('start_date', '>=', startDate);
startDateQueryCondition.addCondition('start_date', '<=', endDate);
var endDateQueryCondition = queryCondition.addOrCondition('end_date', '>=', startDate);
endDateQueryCondition.addCondition('end_date', '<=', endDate);
var overallQueryCondition = queryCondition.addOrCondition('end_date', '>=', endDate);
overallQueryCondition.addCondition('start_date', '<=', startDate);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2016 01:24 PM
#2 - it should show a conflict if the CI is already scheduled in another Change for any period that overlaps.