Report for Ticket Duration

Joshua Lima
Tera Contributor

Hi All,

 

Hoping to get some guidance on a requirement that I got from one of our users. They'd like to have a report that would give them metrics on how long it took for their group to complete a ticket. But they got very specific with it. They wanted it so the duration would only factor in working hours of Mon-Thurs hours of 7:30AM EST to 4:45PM EST and Fridays 8AM EST to 1PM EST, excluding any weekends and holidays that might come up while the ticket is still active. I'm only 5 months into being a Servicenow Admin so it's been a bit tricky to get this report right. I've tried a few scripts that I kind of put together from other re-search I've done (I'm not good with scripting at all). Any help or guidance would be very much appreciated.

 

Thanks!

2 REPLIES 2

Bert_c1
Kilo Patron

Hi Joshua,

 

That is available OOB, please see:

 

https://[instance_name].service-now.com/metric_instance_list.do?sysparm_query=definitionSTARTSWITHIn... 

 

Define a report on that table and filter the records as desired. However, the documentation here:

 

https://docs.servicenow.com/bundle/utah-platform-administration/page/use/reporting/concept/c_MetricD...

 

Indicates a Database view is the way to go. Then you can define a report on the Database View. No scripting is needed.

 

And there is the OOB Database View named "incident_metric" that you can use for the report.

DrewW
Mega Sage
Mega Sage

You can use the following for this kind of thing

1 - SLA's, this is only a good option if they also want to know that something has been open for more than X time.

 

2 - Metrics, these may help since you want to use a schedule

https://docs.servicenow.com/bundle/utah-platform-administration/page/use/reporting/concept/c_MetricD...

https://www.servicenow.com/community/developer-articles/servicenow-introduction-to-metric-instance-s...

 

3 - Performance Analytics, this one is going to require you to have a license for PA.  This is also going to require some scripting but it will also allow you to do some nice visuals.  You can also set it up so it uses different schedules for different data sets.

 

4 - Create a BR that calculates the duration using a schedule and store it in a new Duration field that you create.  The down side of this is that everyone has to use the same schedule.

https://developer.servicenow.com/dev.do#!/reference/api/sandiego/server_legacy/c_DurationCalculatorA...