Add tasks with dependencies for a change request created with a particular template

Add tasks with dependencies for a change request created with a particular template

Requirement:
Add tasks with dependencies for a change request created with a particular template.

UseCase:
Four Predefined tasks will be added to every change request created with "Maintenance" Template.
Task Details:
  1. Scheduling Snapshots
  2. Linux Patching
  3. DBA Patching
  4. Configuring Maintenance mode in OpManager
"Linux Patching" task and "DBA Patching" task are dependent on "Scheduling Snapshot" task.

The tasks would be assigned to the same group and technician as in the change request.  So its mandatory for the change request to have a group and change owner to get this script working.

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.

  3. Go to Admin > Developer Space > Global Functions > New > Paste the content from the attachment addTasks.txt  and save it with a name.

  4. Go to Admin > Developer Space > Global Functions > New > Paste the content from the attachment createTaskDependencies.txt  and save it with a name.

  5. Go to Admin > Developer Space > Change Custom Functions. Create a new function.
    1. Refer to the attached script. (customFunction.txt.)
    2. Update the global function count in the script as per your instance.
  6. Configure Change custom trigger to get executed on every Change being created with a "Maintenance" template.  Invoking condition can be modified as per your requirement.





                  New to ADSelfService Plus?