Auto-create a change via a service request

Auto-create a change via a service request

Requirement:
When a request for change is submitted by a user via a service request with resource answers, then a change should be auto-created, resource answers copied to its description, and the change should be associated with the service request

Usecase:
Service requests are often used to allow the requester to log a request for change. The details for the change are captured using the resource questions section and FAFR is used to make the resource questions interactive. Therefore, when a request for a change-service request is submitted by a requester, it has to create a change with all the details and resource answers in its description and be associated with the service request.

Steps to configure:
1.  Download the attached scripts.  Copy the contents into Request custom functions.

2.  Goto Admin > Request Custom Function > Global Function > New > Paste the global function contents and save it with a name.
Update the SDP configurations details in the global function.


3.  Goto Admin > Request Custom Function > Custom Function > New > Paste the addChangeWithResourceInfoInDesc.txt content and save it with a name
Update the global function count according to your instance


4.  Configure the created custom function in a trigger to get executed every time a request is approved.


          • Related Articles

          • How to auto-create change request(s) for unplanned changes on Assets

            This post describes the use of a python script to auto-create change requests for unplanned modifications on Assets using Custom Schedules. This script is applicable only for builds prior to 11138. UseCase: Multiple assets are inventoried in ...
          • 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 ...
          • Auto-create problem request based on certain criteria.

            This is a sample script that triggers the creation of a Problem Request in ServiceDesk Plus using the Problem API.  Use Case:  ​ All incident requests with Priority = High will create a problem ticket with the request's default field values. ...
          • 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 request using an existing template through powershell.

            This is a Powershell script that calls the ServiceDesk Plus API to create a new request based on an existing Incident or Service Request template name. UseCase: We have Considered a Service Request for 'New Hire' in this script.The Answer that is ...