RITM total duration calculation

GBS
Tera Contributor

I'm using the Before Insert and Update BR to calculate the RITM total duration for Closed Complete RITMs, but the scripts below work only for RITMs with approvals, not for those without.

 

GBS_0-1769658325953.png
GBS_1-1769658371775.png

The RITM, which has a duration of 55 seconds, has the approval on RITM, and 0seconds doesn't have any approval

GBS_2-1769658558319.png

 

 

7 REPLIES 7

Ankur Bawiskar
Tera Patron

@GBS 

I don't think having approval or not having approval has any impact with the script.

I could see the difference between both the times is hardly 3 seconds.

How is closed_at populated? is it via some custom logic/script?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar closed_at is getting populated by using OOB script

@GBS 

then did you add logs and see what came in both the date/time before subtraction and what came after subtraction?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

I have checked and found that the script is not triggering for the RITMs which don't have approvals