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 ADSelfService Plus?

                      • Related Articles

                      • Script to auto-populate the task owner field with the technician who created the request

                        REQUIREMENT: When a technician creates a request and a task is added under the request, the task owner should be the same technician. TESTED IN: Builds 14503 (Postgres) STEPS: 1) Under "Admin" > "Task Custom Functions," create a new custom function ...
                      • Script to Auto share request

                        1. Download MSP_share_Request.zip from the attachment, extract it, and paste the same under ManageEngine\ServiceDesk Plus MSP\integrations\Custom_scripts.          # auto_share_MSP.py      # functions.py      # configuration.json 2. ...
                      • Script to update the Duebytime based on estimated efforts in task

                        Use case When a request has a number of tasks with their estimated hours, the SLA can be set based on the sum of the estimated hours of the tasks created.  Pre-requisite Install python in the application server. Follow the instructions  here ...
                      • Query to show Request and associated task details (PGSQL & MSSQL)

                        Tested in build PGSQL (14300) and MSSQL (14306) PGSQL & MSSQL: SELECT wo.WORKORDERID AS "Request ID", aau.FIRST_NAME AS "Requester", wo.TITLE AS "Subject", pd.PRIORITYNAME AS "Priority", cd.CATEGORYNAME AS "Category", scd.NAME AS "Subcategory", ...
                      • Close the request upon adding a note.

                        Kindly follow the steps mentioned below: 1) Go to Admin >> Developer Space >> Custom Function >> Global Functions >> Copy & Paste the attached GF_Content.txt and save it with a name. Update the URL and technician key as per your instance. Refer to ...