Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2018 05:29 PM
Other option is to calculate business duration. I did it using below script and report of the business duration field.
Scheduled Job - Script
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();
}