Script to auto-populate the "Estimated Efforts" of a task based on the "Category" and "Sub-Category" of an incident request

Script to auto-populate the "Estimated Efforts" of a task based on the "Category" and "Sub-Category" of an incident request

REQUIREMENT:
  1. When an incident request is created, a task should be automatically added to the request.
  1. In the created task, the "Estimated Efforts" field should be automatically calculated based on the Category and Sub-Category of the incident request. For example, when a ticket falls into the "General -> Audit" category and subcategory, a task should be created with an estimated effort of 8 hours.
Tested in builds 14001

STEPS:

>> Kindly download and extract the attached zip file (Create_task_with_estimated_effort_based_on_category_and_subcategory).

>> Under Admin > Developer Space > Global Custom Function > New, create a new custom function, paste the content from the attachment configuration.txt and save it with a name. Update the URL and technician key in the script.



The technician key can be taken under the profile icon as shown below,



>> Under Admin > Developer Space > Request Custom Function > New, create a new custom function, paste the content from the attachment (task_estimated_effort), and save it with a name.



>>  Please modify the category, subcategory, and estimated effort hours as required in the script. Please refer below,



>> Kindly configure a custom trigger as below,



ADDITIONAL REQUIREMENT:

In addition, if the below requirements are needed, then the attached script (3.task_estimated-efforts_new) can be replaced in the request custom function. 

1) The owner of the task should be the owner of the ticket.
2) The start date of the task is the same start date of the ticket and the end date of the tasks should be the same as the Due By date of the incident.

                  New to ADManager Plus?

                    New to ADSelfService Plus?