Script Master - 9: How to automatically create a task in a Change Request.

Script Master - 9: How to automatically create a task in a Change Request.


Let's imagine you are about to install the latest patch update in all the workstations of your IT infrastructure. A change request with a task but without a foolproof plan and implementation strategy will make the change manager's job tough, especially when you have different flavors of workstations like Windows, Linux etc.

So today's Script Master post will help you learn to create a task in a changerequest based on the given values 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 milestone. The type and ID of the entity the task is associated to, has to be specified in the json input that is given in the script. Refer to the comments within the script for more information on the json structure in which the data has to be sent in the API call for creating a task. You can get the script to do this here.

Execution steps:

 

1. Copy the script file into the \Manageengine\ServiceDesk\integration directory.

 

2. Update the script with the help of the comments that are provided within the script.

 

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.



Note:

1. This script was tested on python v3.4.1 - 32 bit.

2. A python library called 'Requests' is necessary to run this script on the application server.

 

To make the best use of this, take a look at the comments in the script and the related post in our resources section.


Trust you find this post useful. In case you've missed the previous posts, visit here. Read through them and send your feedback to us as comments onto the respective posts. See you next Wednesday with another useful script.
              New to ADManager Plus?

                New to ADSelfService Plus?