How do I create a change report that are scheduled to start DAY AFTER TOMORROW

Jobi Thevupara
Tera Contributor

Hi, How do I create a change report that are scheduled to start DAY AFTER TOMORROW for every day?

 

Thanks

Jobi

7 REPLIES 7

Hi @Jobi Thevupara  ,

 

Please try the below filter:

SN_Learn_0-1721647196881.png

 

Change request list:

SN_Learn_1-1721647262645.png

 

Reporting:

 

SN_Learn_2-1721647279268.png

 

 

Mark this as Helpful / Accept the Solution if this helps

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.

AndersBGS
Tera Patron
Tera Patron

Hi @Jobi Thevupara  ,

 

Just utilize below condition - this will give you what you're looking for:

 

AndersBGS_1-1721655522967.png

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

 

Best regards

Anders

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/

Simona Orsakova
Tera Contributor

Hello,

 

I created a script for this:

 

var ChangesForTheDayAfterTomorrow = Class.create();
ChangesForTheDayAfterTomorrow.prototype = Object.extendsObject(AbstractAjaxProcessor, {

    getDayAfterTomorrowChanges: function() {
        var changeArr = [];
        var currentDate = new GlideDateTime().getLocalDate();
        currentDate.addDaysLocalTime(2);
        var start = currentDate + " 00:00:01";
        var end = currentDate + " 23:59:59";
   
        var grCH = new GlideRecord('change_request');
        grCH.addQuery('start_date', '>=', start);
        grCH.addQuery('start_date', '<=', end);
        grCH.query();
        while (grCH.next()) {
            changeArr.push(grCH.sys_id.toString());
        }
        return changeArr;

    },

    type: 'ChangesForTheDayAfterTomorrow'
});
 
Then in the report conditions you will need to insert this:
SimonaOrsakova_0-1721658107260.png

javascript&colon; new ChangesForTheDayAfterTomorrow().getDayAfterTomorrowChanges();

 

The only problem that I am facing is that the GlideDateTime is showing the GMT time, not my local time (+2 hours). Does anybody know how to solve this, please? I already tried to use .getDisplayValue();  but somehow it's not working in my case...

 

Thank you in advance for any advice!