Set Change Requester's reporting_to user as Change Approver

Set Change Requester's reporting_to user as Change Approver

Requirement:
When a Change Request is submitted, Change requester's reporting to manager has to be set as Change Approver.

Steps to follow:
  1. Goto Admin > Developer Space > Global function > New > Paste the content from the attachment  Global_function_4.txt  and save it with a name.
  2. Update the URL and integration key in the script. 
    1. You can get the integration key under Admin > Integrations > Integration Key > New
    2. Please use an integration key with admin privilege, as there wont be any role related permission issues. 

    3. Update the integration key in the global function.

    4. Incase of older builds you can use the techniciankey with admin privilege.
  3. Go to Admin > Developer Space > Change Custom Functions. Create a new function.
    1. Refer to the attached script. (setChangeApprover.txt.)
    2. Update the global function count in the script as per your instance.

  4. Configure Change custom trigger to get executed on every change request being created.





                  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. >> ...
                    • How to set the requester field as logged in user

                      Go to Admin >> Field and Form Rules >> Create a rule with the below script var user = { name:$CS.getLoggedInUserLoginName(), id:$CS.getLoggedInUserId() }; $rf.setFieldValue('requester',user);
                    • Dynamically set ChangeRequester's reporting to user as the Line Manager

                      Requirement: Change Requester's Reporting manager has to be set as the Line Manager. Steps to configure: 1.  Download the attached scripts.  Copy the contents into Change custom functions. 2.  Goto Admin > Change Custom Function > Global Function > ...
                    • 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 ...
                    • Change roles

                      SELECT chdt.changeid               "Change ID",         chdt.title                  "Title",         orgaaa.first_name           "Change Requester",         ownaaa.first_name           "Change Owner",  ...