- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2016 12:59 PM
I wrote a script for a metric that checks Incidents that have been resolved by a certain group(Service Desk) without escalation or assigning the ticket to other groups within the span of 24 hours.
My computation of the duration is pretty straight forward, date difference between created time and resolved time if it is less than 24 hours then the incident gets added to the list.
The problem is the customer wants sort of like a pause condition similar to how an SLA would work. The customer doesn't want the time running if the ticket state is pending vendor or something with pending.
Is there a way to do this? Probably capture the time spent while the ticket was on pending state which I could just subtract from my current computation or something?
Thank you in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2016 01:12 PM
Hi Sean,
You can create a Metric definition for Incident State changes.
Name: Incident State Changes
Table: Incident
Field: Incident State
Type: Field value duration
Once done, you'll start getting the records in the metric instance table (metric_instance). Capture the records whose
1. Definition = Incident State Changes,
2. Value != All Awaiting states
Now dump all these records in a seperate table and write a script to add the duration of all matching incidents.
Hope this will help!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2016 01:22 PM
HI Sean,
I have implemented related thing recently, Here is the link https://community.servicenow.com/message/881921?et=watches.email.thread#881921.
Please let me if you need any further help
PS: Hit like, Helpful or Correct depending on the impact of the response
Srini