Overdue reminder for Change request

Bhagya
Tera Contributor

Technical teams keep the change request in the implement state even after the change is implemented / the change window has expired.
To Plug this, we are planning to Trigger a notification to the Assignment Group Manager, and Change Managers for overdue changes every Alternate day.

 

Could you please suggest how can this be done.

 

4 REPLIES 4

Mark Manders
Mega Patron

Personally, I would just do it daily. Changing a way of working is not easy, but if they get annoyed enough, they will start doing it. Just create a notification for every change on 'implement' if the end date is before today. 

 

If you really want it every other day, you can create a scheduled job for it, using something like this:


// Get today's date
var today = new GlideDate();
   
// Convert today's date to a GlideDateTime object for comparison
var gdtToday = new GlideDateTime(today);

// Use the start date as a reference point (assuming the job should first run on this date)
// Make sure to set this date to when you want the first execution to happen
var startDate = new GlideDateTime('2024-02-09'); // YYYY-MM-DD format
    
// Calculate the difference in days between today and the start date
var timeDifference = gdtToday.getNumericValue() - startDate.getNumericValue();
var oneDay = 1000 * 60 * 60 * 24; // Milliseconds in one day
var daysDifference = timeDifference / oneDay;
    
// Check if the difference in days is even (every other day)
if (Math.floor(daysDifference) % 2 === 0) {
return true; // Run the job
} else {
return false; // Don't run the job
}
})(current);

Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Sarika S Nair1
Kilo Sage

Hi @Bhagya , 

Create a flow designer with trigger type as Repeat every 2 days and look up the change table with condition state is implement and planned end date /Actual end date  before today 

and the use for each loop for sending notification

please refer below screenshots

SarikaSNair1_0-1707463702026.pngSarikaSNair1_1-1707463757633.png

 

Hi @Sarika S Nair1

 

How to send this to specific 'Assigned to' person?

It doesn't really help to ask a new question in an existing thread. It's best to ask your own question, so people are able to answer you instead of answering someone else's question with answers unrelated to theirs.
But: you can set the 'send to' on the notification to 'assigned to'.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark