Auto Close Inc after 2 business days

Anil Karthik N
Tera Contributor

Hi All,

 

I'm working on customizing auto-close logic for incidents. By OOB incidents are auto-closed after 7 days but my requirement is to auto-close after 2 business days(excluding holidays and weekends). I tried using GlideSchedule for this, but I'm running into issues with methods like schedule.subtract() not working as expected. Does anyone have a workaround for subtracting business days from current date.

I'm making changes in OOB BR: incident autoclose

 

Thanks,

Anil

8 REPLIES 8

Juhi Poddar
Kilo Patron

Hello @Anil Karthik N 

Use the add() method of GlideSchedule to add the required business duration. Subtraction isn’t directly supported, but you can add negative values to achieve the same.

 

If this helped, please hit like and mark it as an accepted solution.

 

Thank you 

Juhi Poddar 

Hi @Juhi Poddar ,

I tried adding negative values as well its not working. Please let me know if there is any workaround.

Thanks,

Anil

Hello @Anil Karthik N 

Please refer to the solution provided by Ankur in this thread. How to auto close incidents in 5 working days 

 

If this helped, please hit like and mark it as an accepted solution.

Thank you 

Juhi Poddar 

 

 

 

Hi @Juhi Poddar ,

Thanks for the article, I'm not looking to create any custom schedule job wanted to make changes in OOB BR "incident autoclose" and more over this article looks for only weekends not for holidays.

Thanks,

Anil