{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":978,"path":"api-reference/server-api-reference/c_ChangeCollisionHelperAPI.md","title":"ChangeCollisionHelper - Global","bundle":null,"doc_type":null,"release":"australia","body":"\n# ChangeCollisionHelper- Global\n\nThe ChangeCollisionHelper script include provides helper methods found in the Change Management - Collision Detector \\(com.snc.change.collision\\) plugin.\n\nUse these methods in server side scripts, or when using Ajax calls on the client. You must have the Change Management - Collision Detector plugin installed to use these methods.\n\n**Parent Topic:**[Server API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/api-server.md)\n\n## ChangeCollisionHelper - addCiToChangeAffectedCis\\(String ci, String changeId\\)\n\nAdds the CI to the change's affected CI list.\n\n|Name|Type|Description|\n|----|----|-----------|\n|ci|String|The sys\\_id of the configuration item|\n|changeId|String|The change record's sys\\_id|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n## ChangeCollisionHelper - getAffectedCisByChangeId\\(String changeId\\)\n\nReturns the Affected CI sys\\_ids for the given change.\n\n|Name|Type|Description|\n|----|----|-----------|\n|changeId|String|A change record's sys\\_id|\n\n|Type|Description|\n|----|-----------|\n|Array|An array of sys\\_ids of affected CIs.|\n\n## ChangeCollisionHelper - getBlackoutsByDate\\(GlideDateTime startDate, GlideDateTime endDate\\)\n\nReturns any blackout that overlap the period defined by startDate and endDate.\n\n|Name|Type|Description|\n|----|----|-----------|\n|startDate|GlideDateTime|The beginning date|\n|endDate|GlideDateTime|The ending date|\n\n|Type|Description|\n|----|-----------|\n|Array|An array of blackouts \\(blackoutId:stringSpan\\).|\n\n## ChangeCollisionHelper - getChangesWithAffectedCi\\(String ci, GlideDateTime startDate, GlideDateTime endDate\\)\n\nReturns changes scheduled in the timespan \\(defined by startDate and endDate\\) that have the given CI in their Affected CIs list.\n\n|Name|Type|Description|\n|----|----|-----------|\n|ci|String|The configuration item's sys\\_id|\n|startDate|GlideDateTime|The beginning date|\n|endDate|GlideDateTime|The ending date of the time span|\n\n|Type|Description|\n|----|-----------|\n|Array|An array of change record's sys\\_ids|\n\n## ChangeCollisionHelper - getChangesWithCi\\(String ci, GlideDateTime startDate, GlideDateTime endDate\\)\n\nReturns the changes that are in the timespan \\(startDate, endDate\\) and that are linked to the given CI.\n\n|Name|Type|Description|\n|----|----|-----------|\n|ci|String|The configuration item's sys\\_id|\n|startDate|GlideDateTime|The beginning date|\n|endDate|GlideDateTime|The ending date of the time span|\n\n|Type|Description|\n|----|-----------|\n|Array|An array of sys\\_ids for change records|\n\n## ChangeCollisionHelper - getCiMaintenanceSchedule\\(String ci\\)\n\nReturns the Maintenance Schedule for a CI.\n\n|Name|Type|Description|\n|----|----|-----------|\n|ci|String|The configuration item's sys\\_id|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n## ChangeCollisionHelper - getDependants\\(String ci\\)\n\nReturns all the CIs that depend on the given CI.\n\n|Name|Type|Description|\n|----|----|-----------|\n|ci|String|A configuration item's sys\\_id|\n\n|Type|Description|\n|----|-----------|\n|Array|An array of CIs|\n\n## ChangeCollisionHelper - getDependencies\\(String ci\\)\n\nReturns all the CIs that the given CI depends on.\n\n|Name|Type|Description|\n|----|----|-----------|\n|ci|String|The configuration item's sys\\_id|\n\n|Type|Description|\n|----|-----------|\n|Array|An array of CIs|\n\n## ChangeCollisionHelper - isCiInAffectedCis\\(String ci, String changeId\\)\n\nCheck if an CI is already in the change's affected CIs list.\n\n|Name|Type|Description|\n|----|----|-----------|\n|ci|String|The sys\\_id of the configuration item|\n|changeId|String|The change record's sys\\_id|\n\n|Type|Description|\n|----|-----------|\n|Boolean|True if the CI already is in the change's affected CI list.|\n\n## ChangeCollisionHelper - isDateInCiMaintenanceWindows\\( GlideDateTime startDate, GlideDateTime endDate, String maintenanceWindow\\)\n\nChecks if the time span defined by startDate and endDate falls in the CI's maintenance window.\n\n|Name|Type|Description|\n|----|----|-----------|\n|startDate|GlideDateTime|The beginning date|\n|endDate|GlideDateTime|The ending date|\n|maintenanceWindow|String|The configuration item's sys\\_id|\n\n|Type|Description|\n|----|-----------|\n|Boolean|True if the time span is in the CI's maintenance window|\n\n"}}