Metric for approval (sysapproval_approver) table to record state duration

Arlen
Mega Expert

We need to capture how long each approval remained in any particular state. Sounds like a metric right? Well, creating the metric is easy enough, however, no metric instances are created even after logging demo incidents or change requests each with multiple approvals.
Here's the process:
1) Create a metric and from the table drop down choose Approval (sysapproval_approver)
2) Choose State from the field drop down and save the metric
3) Create a change or an incident record and add few approvers
4) Go back to the metric you created and observe that no instances have been added (there should be some)
5) Go to the approvers tab on the change or incident and approve or reject the approvals
6) Again, check the metric that you created and observe that there are no instances

Just wondering if we're missing something?

Any help is greatly appreciated 🙂

1 ACCEPTED SOLUTION

Chris_Hann
ServiceNow Employee
ServiceNow Employee

Hi,

I believe the reason your metrics aren't being captured is because the business rule which fires the


metric.update
event runs on the Task table, which

sysapproval_approver
does not extend.

Follow the steps below to setup a similar rule on

sysapproval_approver
:
  • Go to Metrics...Business Rules and open the

    metrics events
    Business Rule
  • Change the Name to

    metric events (sysapproval_approver)
    and the Table to

    Approval [sysapproval_approver]
  • Right-click on the form header and select Insert



Chris


View solution in original post

6 REPLIES 6

This worked amazing!

Dan Shores
Mega Expert

Hello -

 

Is anyone aware if we can get these results on the 'sysapproval_approver_metric' table similar to 'chage_request_metric'?

 

We are able to get field value durations on the 'change_request_metric' table which allows us to bring in fields from the change request as well as the metric instance, but it does not work for me on the 'sysapproval_approver_metric' table. Our approval duration metric works but only logs on the 'metric_instance' table where we can not even reference who the approval was assigned to.

 

Thank you,


Dan