Report on metrics to show average time to close stories
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2025 03:57 PM
Hello everyone!
I have a requirement to build a report for our leaders to view when they are reviewing metrics. They need to see a report that shows the total time from Story creation until the story is completed and they need to see it as an average for all stories completed between 7/1/24 thru 6/30/25 for stories assigned to the ServiceNow Development Group.
Basically, I need a report that shows the the average time it took the team to get stories from start to finish during this time period. Does anyone have experience with this type of report?
I tried creating a metric definition in our DEV instance and I did not have any luck.
We do have a metric definition called "enhancement duration" and it is "script calculation" type.
I copied over the script to a NEW metric definition called "ServiceNow Story Cycle Time" and made necessary updates and no data returned on my report.
I further tested by using other metric definitions in my condition and information returns for the report if I used other metric definitions for the same table [rm_story]. I even went another step further and changed the type to 'field value duration" for my new metric definition (just in case the script had an error) and still no luck.
Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2025 10:09 PM
@kdelbridge I am expecting your metrix definition works fine for new story.
But for old stories which are from past, you can not see any data because metric definition generate data on real time whenever matching condition met when moving story.
To bring old data you will need to have a seperate background/fix script which will bring data from audit table .
If it makes sense!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2025 03:23 AM
Thanks for your reply! I "think" I have my metrics now.
I did run a background script to collect my metrics for existing stories. It did take several iterations as my first script brought over all stories when I only wanted ones assigned to a certain group. Ran a clean up script and believe I have what I need now.
Thanks so much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 02:16 PM
Hi @kdelbridge
As @Abhay Kumar1 also have highlighted, do you see your metric definition working as expected for new stories? Metrics are only created for new stories, not old once. Furthermore, if you would like the average of a sum of stories, I would recommend performance analytics to do the calculation based on metrics.
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/