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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2018 01:12 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2018 01:47 PM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2018 02:00 PM
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();
}