How to get lead time and cycle time in VTB?

Ksnow
Tera Contributor

Hello all,

Is customization possible for this, I want to see lead time(incident opened to closed) and cycle time (how long the incident has been on each state). in the VTB. Every state time should be calculated and shown on the VTB

If yes, please help me with the process along with screenshots.

@Willem @Willem  please have a look at it, it's urgent

Thanks,

K

8 REPLIES 8

Willem
Giga Sage
Giga Sage

Do you already have the fields for duration? If so, you can do the steps below.

If not, first create them. This might help you:

https://docs.servicenow.com/bundle/london-application-development/page/script/general-scripting/conc...

Basically create a business rule that on update updates the duration field with:

<duration_field> = GlideDateTime.subtract(new GlideDateTime(<start_time>.getValue()),gs.nowDateTime());

 

The Incident table has a "VTB"-view. From there on you can configure which fields will show:

find_real_file.png

Then on the VTB itself activate the following:

find_real_file.png

"Show Card Info". Make sure "Show Compact Cards" is inactive. Otherwise it will only show a few fields.

Ksnow
Tera Contributor

Yes, I tried this but I want to take swimlanes as priority, and main lanes as state. It's not allowing to inactive "show compact cards".

All duration fields should be visible on the VTB and I want to segregate the priority and state in one VTB, is it possible? any other way around?

Please help.

Thanks,

K

Hi K,

I was helping someone else with that as well. If you disable swimlanes and use my workaround to sort per column on priority:

https://community.servicenow.com/community?id=community_question&sys_id=3862f4c1dbd294d0f21f5583ca96...

 

Please mark as Helpfull and Correct answer. Motivates to keep helping the community!🤘

Ksnow
Tera Contributor

I tried the BR you have provided in the above link, nothing happened.

Just to ask you what is the code for? arranging the priority incidents in the state lanes?

Please provide clarity on it.

Thanks,

K