How to make a report for Business Duration for each Assignment Group

Beto
Mega Guru

How can I make a report for Business Duration for each Assignment Group? I am trying to get each team's turnaround time. I do not want to include the "Average" column; I only want the incident column. This will be include on my dashboard. Please see below of my example.

 

find_real_file.png

 

2 REPLIES 2

Tracy Davis
Giga Guru

I don't believe you can do something this clean in reporting.

Do you have PA? You should be able to it there much easier.

you'd need to create an indicator that calculates Average time to resolve. In the Indicator, there is an area to select Aggregate = Average, then check scripted and use the following.

Also set units to Hours with Precision = 2.

I have it displayed in a breakdown/scorecard view with Assignment group as the breakdown.

 

find_real_file.png

Mike Patel
Tera Sage

1st you need to calculate business duration for each ticket than you can run report against business duration field.

You can run scheduled Job with below script. Make sure you add sysid of your schedule. once all tickets has correct business duration run report on metric_instance table.

var gr = new GlideRecord("metric_instance");
gr.addEncodedQuery('end!=NULL^business_duration=NULL');
gr.autoSysFields(false); // so that the records don't have system updates
gr.query();
while(gr.next()) {
	var gsBusiness =new GlideSchedule('dcf6c8fedb5d7e007d1bfa0dbf9619db');
	// Get duration based on schedule
	gr.business_duration = gsBusiness.duration(gr.start.getGlideObject(), gr.end.getGlideObject());
	gr.setWorkflow(false); 
	gr.update();
}