Script to automatically populate the "Line Manager" role based on the Change Requester

Script to automatically populate the "Line Manager" role based on the Change Requester

"When a Change Request is created, the Line Manager role will automatically be assigned to the user specified in the 'Reporting to' field of the particular Change Requester.

Tested in builds: 14300 and 14303.

Download the scripts attached.

Global Custom Function:

Under Admin > Global Custom Function > Custom Function > New > Paste the global_function_4_Configuration .text content and save it with a name.


Change Custom Function:

Navigate to Admin > Change Custom Function > Custom Function > New > Paste the set_ChangeRequesterReportingToUser_As_LineManager.txt content and save it with a name



Custom Trigger:

Under Admin > Custom Trigger > Change, configure a custom trigger as below,




Note:


In the Custom Trigger, invoking Condition can be modified as per your requirement.

 When a Technician raises a change request, no modification to the change role is necessary. However, when a Requester raises a change request, the Line Manager role under Change Roles must be set to 'All Users' as shown below for the custom trigger to be executed successfully."



                  New to ADSelfService Plus?

                    • Related Articles

                    • Script to set Change Approver based on the Requester's Reporting to

                      Tested in build 14306 Requirement: When a change is created, the Change Approver role is to be filled automatically with the Change Requester's "Reporting to" user. Steps: >> Attached are the contents for Global and Change Custom Functions. >> ...
                    • 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 ...
                    • 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 ...
                    • How to automatically create a task in a Change Request.

                      This is a sample script to create a task in a Change Request based on the values given in certain fields. This is done by using an API call to create  a task in ServiceDesk Plus. The task can also be created in a request, problem, project or a ...
                    • How to create a new change request automatically from a request.

                      This script is applicable only for builds prior to 11138. This is a sample python script that triggers the creation of a Change Request in ServiceDesk Plus using the Change API.The request ID of the parent request is appended  to the subject line of ...