How to assign CAB members to a change request automatically.

How to assign CAB members to a change request automatically.

Note:  Attached script will not work beyond 11138 SDP Version.

This is a sample script to add CAB Members to a Change Request through Change Custom Triggers.The CAB Members can only be added manually to the Change Request ,under the Approval Tab, after it has been created.By using this script we will be able to add the CAB Members to  Change Request automatically , based on any one the Field values that are available in the Change Template.

The CAB members that are referenced in the script have to be set up in the application first, under Admin Tab \ Change Advisory Board.

Use Case:
Based on the value set in the Impact Field ,when creating a Change Request, the CAB Members are set under the Approval tab.This is done by executing the script through Change Custom Triggers.
 

This is achieved by submitting a update request to the application in a specific JSON format, a example of which is give below.
{'message': 'Adding CAB members through Custom Trigger', 'operations': [{'operation_name': 'UPDATE_ROLES', 'input_data': {'change': {'roles': [{'name': 'CAB', 'users': [{'email': 'TheOne@Matrix.WB ', 'name': 'Neo'}, {'email': 'FollowTheRabit@Matrix.WB',' name': 'Trinity'}] }] }} }] }

You can find more information about this feature in the link here.All Change Roles can be set / updated using this feature.The details of the Change Request are provided as input to the script, in JSON format.More information on Change Custom Triggers can be found in this link.
  
Execution Steps:
1. Copy the script file into the \Manageengine\ServiceDesk\integration directory.
2.Update the script by adding the name and email address of the CAB members. Make sure you follow the syntax provided in the comments section to make necessary changes. 
3.Configure the script under the  Admin -> Change Custom Triggers . Provide the path of the change json file as the input to the script.

Below is a screenshot showing a sample configuration.



A short guide on setting up python is available here.

Take a look at the following video for more information on configuring the script.





                  New to ADManager Plus?

                    New to ADSelfService Plus?