Close Ticket Business Rule [sc_task]

Tracey Wilmot
Tera Contributor

Hi all,

I'm trying to generate the duration of a SC Task or RITM.  I found the following KB article:

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0684036

I've updated the Close Ticket business rule as it suggests but the the Business Duration field is not populating...

find_real_file.png

find_real_file.png

Any help greatly appreciated.  I would like to do the same for RITMs too.

Many thanks

Tracey

1 ACCEPTED SOLUTION

Dan H
Tera Guru

Hi Tracey,

Could you try this script instead?

current.active = false;
current.work_end = nowDateTime();
current.business_duration = gs.dateDiff(current.opened_at.getDisplayValue(),current.work_end.getDisplayValue(),false);

 

Let me know the outcome.

Please mark my answer as Correct/Helpful based on impact

Regards,

Dan H

View solution in original post

11 REPLIES 11

Looks like I wasn't following your instructions closely enough.  I've gone through it again and it works!!  Thank you so much for your help!

find_real_file.png

No problem at all! Glad it's working.