Update Change Roles using Change Custom Function

Update Change Roles using Change Custom Function

This is a sample Deluge script to set Line Manger field.
When a Change Request is created, ChangeRequester's reporting_to user is set as the Line Manager automatically, using 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.

{"operations": [{"input_data": {"change": {"roles": [{"users": [{"name": "Hugo.Weaving", "email": "Agent.Smith@Matrix.WB"}], "name":
"Line Manager"}]}}, "operation_name": "UPDATE_ROLES"}], "message": "Updating Change Roles through Custom Trigger"}

User Case:
Assume Service Request template in request module.  We have option to send automatic approvals to a $REPORTING_TO$ user automatically. 
Similarly, In change module we do not have the option to automatically set the Line Manager to $REPORTING_TO$ user of the ChangeRequester.  This can be achieved using a custom script. 

Execution steps: 
1. Copy the script content and Goto > Admin > Request Custom Function > New.  Paste the copied content and save it with a name.

2. Configure the script under the Admin > Change custom triggers.



                  New to ADSelfService Plus?

                    • Related Articles

                    • Risk Matrix for Change using Custom Module

                      Overview: A risk matrix helps in identifying risks based on how likely they are to happen and how serious their impact could be. This makes it easier to decide which risks need urgent attention and which ones can be watched over time. It helps manage ...
                    • Risk matrix for Change using Custom module

                      UseCase: Risk need to be calculated through Risk matrix (similar to Priority matrix in the request module) Steps to configure: Configure custom module as in the attached screenshot. 1. Navigate to Admin --> Developer space --> Custom module --> ...
                    • How to automatically assign users to different roles in a change request.

                      This script is applicable only for builds prior to 11138. This is a sample python script to read the value in the Change Owner field, when a Change Request is created and set him/her as the Change Implementer automatically, using Change Custom ...
                    • Change Risk Assessment Questionnaire using Custom module - Implementation steps

                      We’re excited to share a step-by-step guide( Attached) on implementing a Change Risk Assessment Questionnaire in ServiceDesk Plus using the Custom Module feature. This solution leverages Custom Modules, Change Additional Fields, and Field & Form ...
                    • Close change requests using custom schedules.

                      This post describes the use of a python script to close change that are in a specific stage using Custom Schedules.   Use Case: There may be a scenario where number of old Change Requests that have gotten lost in the shuffle over the years. Most of ...