Request Item metrics from Open to Approve to Close
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2016 11:55 AM
I'm looking for an example of setting up a Request Item SLA to track duration from Open to Approve and Approve to Close. I tried creating a single SLA definition on the sc_req_item table with conditions:
Start Condition: State is Open
Stop Condition: State is not one of Closed Complete, Closed Incomplete or Cancelled
Pause Condition: Approval is Requested
I wanted to use 'Stage' rather than 'State' in the conditions only shows 'catalog item removed' as the only option. (this may be a whole other issue as that's the only option for stage when building workflows as well)
I also tried creating a Metrics business rule on the sysapproval_approver table with the following script:
var gru = new GlideScriptRecordUtil.get(current)
var fieldsChanged = gru.getChangedFieldNames();
gs.eventQueue('metric.update', current, fieldsChanged.toString(), current.sys_mod_count, 'metric_update');
...but I need a next step to test this.
Thanks,
Susan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2016 02:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2016 01:50 PM
Thank you for the information Michael. I created a Metric Definition on the sc_req_item table and checked Timeline.
Then created a report but no data is displayed.
This seems like the right way to go but I must be missing something. Any suggestions would be helpful.
Susan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2016 02:05 PM
The Metric will start on newly created tickets, not tickets in the past. Try creating a new ticket and see if a metric instance is created.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2016 05:06 AM
Sorry, your report should be on the incident_metric table, not metric_instances.