Support Group Incident Timer – Part 1 – Creating the Object
I’ve had a question around timing how long an incident remains in a queue for. Although Service Manager tracks when an object is in a queue and we can report on this in the cubes – there is no recording of how long the item was in that queue for. Also the concept of a queue is an abstract one – there is no concrete object in Service Manager that I can tap into and extend for an item to track time.
I thought about this for awhile – the approach I’ve taken is to create a new type of object which can be added as a work item to an incident (Service Requests can be done later) which will record a few statistics about the support group that an incident is assigned to. This post (and others to come) will details how I have implemented the process. The end goal is to have this as a reportable item in the data warehouse.
First was to create an object which represented a timer. In the authoring tool the I created a new work item class and added some properties as below.
I changed the types for each of the properties – the duration and end time I made un-editable, so that someone cannot manipulate the times. There is also a relationship created between the Work Item class and my new class. An explanation of each of the classes is below.
- Duration – Time between start and end time (minutes)
- Start Time – Initially when the object is created this is set to the current time. If the support group changes and then is changed back to the original group this time is reinitialised. I use the same object for multiple occurrences of the support group.
- End Time – Time when the object is closed and the duration is calculated. If a value already exists for the duration it will be added to the current value
- Status – I set this to either Active or Closed if the current incident support group represents the active timer object
- Support Group – Represents the support group
- WorkItemID – Represents the incident ID
Once I had sealed and imported the management pack I created a view for the objects and tested adding some objects. The results are below – and I can add a support group timer object to an incident.
Also I can open an object and it is displayed using a simple form I created in the same management pack.
In the next post I will go through how I use Orchestrator to manage the objects when the support group is modified.