Had this requirement the other day regarding Change Freeze dates. The customer wanted to warn technicians raising changes that their scheduled change dates fell into their upcoming annual change freeze window.

As a quick fix, we added the following script to their default Change Template as a Field & Form On Form Load rule to prompt the Technicians with a warning if this was the case:

Script Code

var start_freeze_window = new Date("20 Dec 2017, 15:23:00");
var end_freeze_window = new Date("02 Jan 2018, 15:23:00");


if(
  ($CS.getValue("SCHEDULEDSTARTTIME").getTime() <= end_freeze_window.getTime() && 
   $CS.getValue("SCHEDULEDSTARTTIME").getTime() >= start_freeze_window.getTime())
)   
{
    alert("Start date falls during change freeze.");
    /*stop form submission*/
    $CS.stopFormSubmission();


}
else if(
  ($CS.getValue("SCHEDULEDENDTIME").getTime() <= end_freeze_window.getTime() && 
   $CS.getValue("SCHEDULEDENDTIME").getTime() >= start_freeze_window.getTime())
)   
{
    alert("End date falls during change freeze.");
    /*stop form submission*/
    $CS.stopFormSubmission();


}
else if ($CS.getValue("SCHEDULEDSTARTTIME").getTime() <= start_freeze_window.getTime() && 
   $CS.getValue("SCHEDULEDENDTIME").getTime() >= end_freeze_window.getTime())
{
    alert("Change freeze period during scheduled dates.");
    /*stop form submission*/
    $CS.stopFormSubmission();  
} 

Obviously this only deals with a single upcoming date range based on values defined in the script variables.

If I was to take this further I’d probably look at the possibility of using the Change Custom Triggers to action an external script to look up the current Change Freeze dates from a Change Freeze record in ManageEngine ServiceDesk Plus (via the API) or perhaps performing an external lookup of dates.

One for another time … ;0)

Enjoy!

This article is relevant to:
Service Desk

You may be interested in these other recent articles

ManageEngine ServiceDesk Plus Cloud Build Release Information

25 July 2024

Summary details of the current Build Release information for ManageEngine ServiceDesk Plus Cloud Edition. All upgrades are performed by the Zoho Cloud team. Should you…

Read more

ManageEngine Analytics Plus Build Release Information

23 July 2024

Summary details of the current build release information for ManageEngine Analytics Plus. Scroll the above to view more release details. Download the latest service packs…

Read more

ManageEngine ADSelfService Plus Build Release Information

12 July 2024

The current build release information for ManageEngine ADSelfService Plus is summarised below. Scroll down for more information. You can download the latest service packs here.…

Read more

ManageEngine Password Manager Pro Build Release Information

21 June 2024

The current build release information for ManageEngine Password Manager Pro is summarised below. Scroll down for more information. You can download the latest service packs…

Read more

Security Advisory – Important Security Fix Released For ManageEngine Solutions

17 June 2024

Product Name Affected Version(s) Fixed Version Fixed on Password Manager Pro 12430 and below 12431 14/06/2024 PAM360 7000 and below 7001 14/06/2024 DetailsAn SQL injection…

Read more