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

After the priority changes it will update the order of the Card on the VTB accordingly. Basicly creating 5 options it can be placed:

Starting at the top with critical and moving down to priority planning.

Can you try the simpler version:

(function executeRule(current, previous /*null when async*/ ) {
	var orderCard = '1000'; //Default order to 1000 so it is at the bottom
	//Set order based on Priority of the incident (this is to allow mapping)


	orderCard = current.priority;

	//We get the card and update the order
	var grCard = new GlideRecord('vtb_card');
	if (grCard.get('task', current.sys_id)) {
		grCard.order = orderCard;
		grCard.update();
	}

})(current, previous);

I made a mistake. I had State.. but ofcourse need to be Priority. Can you try it now (I have updated both scripts).

@Ksnow Did it work for you?

It will only update on changes of priority. If you want to be complete, we can create a business rule on Insert of the Card that sets the priority based on the Incident. Let me know if you want that.

@Ksnow is this resolved? If so, can you mark answer as Helpful and Correct? This will close the thread.

If not, let me know how we can help 🙂

Kind regards,

Willem