Check the created time falling in between business hours or not and deciding the SLA Definition.

maheshm
Tera Expert

Hello Folks,

wondering if there is a way to find if a ticket is created in the business hours or not and set a flag based on the output.

 

The requirement goes like this.

Business Hours are 8 30am to 5 30pm.

Incident is created between 8 30am and 5 30pm on Day 1(it can be under any timezone), the flag In Business Hour is TRUE.

if the incident is created after 5 30pm on Day 1 and before 8 30am on Day 2 (next day or next business day), the flag In Business Hour must be FALSE.

 

Based on this flag set, am trying to configure my SLAs that carry different timings for In time and out of business hour schedule.

 

any leads on this ?

 

thanks !

Mahesh.

1 ACCEPTED SOLUTION

I just helped another person w/ a similar issue. See his post:

https://community.servicenow.com/community?id=community_question&sys_id=46fee2f2db8a93444816f3231f96193e

 

Add this to the top of the script:

var ticketTime = <get value of ticket created time>;

ticketTime .add(ticketTime .getTZOffset() * -1);

 

Might help...hopefully

View solution in original post

5 REPLIES 5

I just helped another person w/ a similar issue. See his post:

https://community.servicenow.com/community?id=community_question&sys_id=46fee2f2db8a93444816f3231f96193e

 

Add this to the top of the script:

var ticketTime = <get value of ticket created time>;

ticketTime .add(ticketTime .getTZOffset() * -1);

 

Might help...hopefully