---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# ChangeCollisionHelper - Global

# ChangeCollisionHelper - Global {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read

The ChangeCollisionHelper script include provides helper methods found in the Change Management - Collision Detector (com.snc.change.collision) plugin.

Use 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.

## ChangeCollisionHelper - addCiToChangeAffectedCis(String ci, String changeId) {#ariaid-title2}

Adds the CI to the change's affected CI list.
{#r_CCH-addCiToChgAffectedCis_S_S__table_xph_pw2_zt__entry__3}

| Name | Type | Description |
|-|-|-|
| ci | String | The sys_id of the configuration item |
| changeId | String | The change record's sys_id |
[Table 1. Parameters]

{#r_CCH-addCiToChgAffectedCis_S_S__table_xph_pw2_zt} {#r_CCH-addCiToChgAffectedCis_S_S__table_yph_pw2_zt__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 2. Returns]

{#r_CCH-addCiToChgAffectedCis_S_S__table_yph_pw2_zt}

## ChangeCollisionHelper - getAffectedCisByChangeId(String changeId) {#ariaid-title3}

Returns the Affected CI sys_ids for the given change.
{#r_CCH-getAffectedCisByChangeId_S__table_r4y_bw2_zt__entry__3}

| Name | Type | Description |
|-|-|-|
| changeId | String | A change record's sys_id |
[Table 3. Parameters]

{#r_CCH-getAffectedCisByChangeId_S__table_r4y_bw2_zt} {#r_CCH-getAffectedCisByChangeId_S__table_s4y_bw2_zt__entry__2}

| Type | Description |
|-|-|
| Array | An array of sys_ids of affected CIs. |
[Table 4. Returns]

{#r_CCH-getAffectedCisByChangeId_S__table_s4y_bw2_zt}

## ChangeCollisionHelper - getBlackoutsByDate(GlideDateTime startDate, GlideDateTime
endDate) {#ariaid-title4}

Returns any blackout that overlap the period defined by startDate and
endDate.
{#r_CCH-getBlackoutsByDate_GDT_GDT__table_jhy_g52_zt__entry__3}

| Name | Type | Description |
|-|-|-|
| startDate | GlideDateTime | The beginning date |
| endDate | GlideDateTime | The ending date |
[Table 5. Parameters]

{#r_CCH-getBlackoutsByDate_GDT_GDT__table_jhy_g52_zt} {#r_CCH-getBlackoutsByDate_GDT_GDT__table_khy_g52_zt__entry__2}

| Type | Description |
|-|-|
| Array | An array of blackouts (blackoutId:stringSpan). |
[Table 6. Returns]

{#r_CCH-getBlackoutsByDate_GDT_GDT__table_khy_g52_zt}

## ChangeCollisionHelper - getChangesWithAffectedCi(String ci, GlideDateTime startDate,
GlideDateTime endDate) {#ariaid-title5}

Returns changes scheduled in the timespan (defined by startDate and endDate) that have
the given CI in their Affected CIs list.
{#r_CCH-getChgWAffectedCi_S_GDT_GDT__table_jfd_w52_zt__entry__3}

| Name | Type | Description |
|-|-|-|
| ci | String | The configuration item's sys_id |
| startDate | GlideDateTime | The beginning date |
| endDate | GlideDateTime | The ending date of the time span |
[Table 7. Parameters]

{#r_CCH-getChgWAffectedCi_S_GDT_GDT__table_jfd_w52_zt} {#r_CCH-getChgWAffectedCi_S_GDT_GDT__table_kfd_w52_zt__entry__2}

| Type | Description |
|-|-|
| Array | An array of change record's sys_ids |
[Table 8. Returns]

{#r_CCH-getChgWAffectedCi_S_GDT_GDT__table_kfd_w52_zt}

## ChangeCollisionHelper - getChangesWithCi(String ci, GlideDateTime startDate, GlideDateTime
endDate) {#ariaid-title6}

Returns the changes that are in the timespan (startDate, endDate) and that are linked
to the given CI.
{#r_CCH-getChangesWithCi_S_GDT_GDT__table_vht_4v2_zt__entry__3}

| Name | Type | Description |
|-|-|-|
| ci | String | The configuration item's sys_id |
| startDate | GlideDateTime | The beginning date |
| endDate | GlideDateTime | The ending date of the time span |
[Table 9. Parameters]

{#r_CCH-getChangesWithCi_S_GDT_GDT__table_vht_4v2_zt} {#r_CCH-getChangesWithCi_S_GDT_GDT__table_wht_4v2_zt__entry__2}

| Type | Description |
|-|-|
| Array | An array of sys_ids for change records |
[Table 10. Returns]

{#r_CCH-getChangesWithCi_S_GDT_GDT__table_wht_4v2_zt}

## ChangeCollisionHelper - getCiMaintenanceSchedule(String ci) {#ariaid-title7}

Returns the Maintenance Schedule for a CI.
{#r_CCH-getCiMaintSched_S__table_kgl_vt2_zt__entry__3}

| Name | Type | Description |
|-|-|-|
| ci | String | The configuration item's sys_id |
[Table 11. Parameters]

{#r_CCH-getCiMaintSched_S__table_kgl_vt2_zt} {#r_CCH-getCiMaintSched_S__table_lgl_vt2_zt__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 12. Returns]

{#r_CCH-getCiMaintSched_S__table_lgl_vt2_zt}

## ChangeCollisionHelper - getDependants(String ci) {#ariaid-title8}

Returns all the CIs that depend on the given CI.
{#r_CCH-getDependants_S__table_phr_4x2_zt__entry__3}

| Name | Type | Description |
|-|-|-|
| ci | String | A configuration item's sys_id |
[Table 13. Parameters]

{#r_CCH-getDependants_S__table_phr_4x2_zt} {#r_CCH-getDependants_S__table_qhr_4x2_zt__entry__2}

| Type | Description |
|-|-|
| Array | An array of CIs |
[Table 14. Returns]

{#r_CCH-getDependants_S__table_qhr_4x2_zt}

## ChangeCollisionHelper - getDependencies(String ci) {#ariaid-title9}

Returns all the CIs that the given CI depends on.
{#r_CCH-getDependencies_S__table_esm_xx2_zt__entry__3}

| Name | Type | Description |
|-|-|-|
| ci | String | The configuration item's sys_id |
[Table 15. Parameters]

{#r_CCH-getDependencies_S__table_esm_xx2_zt} {#r_CCH-getDependencies_S__table_fsm_xx2_zt__entry__2}

| Type | Description |
|-|-|
| Array | An array of CIs |
[Table 16. Returns]

{#r_CCH-getDependencies_S__table_fsm_xx2_zt}

## ChangeCollisionHelper - isCiInAffectedCis(String ci, String changeId) {#ariaid-title10}

Check if an CI is already in the change's affected CIs list.
{#r_CCH-isCiInAffectedCis_S_S__table_egt_cx2_zt__entry__3}

| Name | Type | Description |
|-|-|-|
| ci | String | The sys_id of the configuration item |
| changeId | String | The change record's sys_id |
[Table 17. Parameters]

{#r_CCH-isCiInAffectedCis_S_S__table_egt_cx2_zt} {#r_CCH-isCiInAffectedCis_S_S__table_fgt_cx2_zt__entry__2}

| Type | Description |
|-|-|
| Boolean | True if the CI already is in the change's affected CI list. |
[Table 18. Returns]

{#r_CCH-isCiInAffectedCis_S_S__table_fgt_cx2_zt}

## ChangeCollisionHelper - isDateInCiMaintenanceWindows( GlideDateTime startDate,
GlideDateTime endDate, String maintenanceWindow) {#ariaid-title11}

Checks if the time span defined by startDate and endDate falls in the CI's maintenance
window.
{#r_CCH-isDateInCiMaintW_GDT_GDT_S__table_gjr_ys2_zt__entry__3}

| Name | Type | Description |
|-|-|-|
| startDate | GlideDateTime | The beginning date |
| endDate | GlideDateTime | The ending date |
| maintenanceWindow | String | The configuration item's sys_id |
[Table 19. Parameters]

{#r_CCH-isDateInCiMaintW_GDT_GDT_S__table_gjr_ys2_zt} {#r_CCH-isDateInCiMaintW_GDT_GDT_S__table_hjr_ys2_zt__entry__2}

| Type | Description |
|-|-|
| Boolean | True if the time span is in the CI's maintenance window |
[Table 20. Returns]

{#r_CCH-isDateInCiMaintW_GDT_GDT_S__table_hjr_ys2_zt}

