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 (Preferable version 3.7)
Steps
1. Download the zip file from the attachment, extract them under ManageEngine\ServiceDeskPlus-MSP\integration\custom_scripts
2. Edit configuration.json and configure the URL and technician key. You can obtain the technician key from the application UI, by clicking on the user badge on the right corner and Personalize, then API Key Generation. If you already have the configuration.json and functions.py from any of the previous scripts, then you don't have to replace them.
3. Go to Admin >> Custom Trigger >> Configure a condition and under Action, paste the below script name
python msp_update_duebytime.py $COMPLETE_V3_JSON_FILE
Now, any request matching the condition will trigger the script which will update the DueByTime.
Note
1. We are updating the Duebytime only as a value and not applying the SLA
2. Since the SLA is not applied here when the Duebytime exceeds, it will not send any notification or mark the request as SLA violated.
3. The Update_dueby_time_including_weekends_holidays.zip will skip the weekends (Sat/Sun) and holidays
4. The Update_dueby_time_including_weekends_holidays.zip will skip the weekends (Fri/Sat) and holidays
The holidays should be hardcoded in line 10 as shown below