Metrics with script calculation.

shalinikacham
Kilo Expert

Hi all,

I'm trying to create metrics to calculate 'Time between ticket creation and ticket closure' for a particular assignment group.

I've written the following code so far but the script doesn't work at all whatever the condition is.

find_real_file.png

From Subject Received Size Categories Andy Parimi FW: ServiceNow Metric Data 8:40 AM 40 KB

10 REPLIES 10

FYI - Metrics


Yes. I've done some research on the same but i'm unable to figure out how to trigger the event using a business rule? What should be the condition in the BR?



Help appreciated. Thanks so much.


Michael Fry1
Kilo Patron

You might want to add additional conditions like:


var s = current.incident_state;


if (s > 6)



otherwise the Metric will trigger every update as long as the group is IT-AppDeploy


Thanks Michael. The problem is, It is not triggered at all. Learned that i have to write a BR for it but not sure what it should include.


The BR can contain your script, and the conditions would go into the conditions field.


Here is an example of how to write the BR: Re: Is there a way to report on audits in a way that is efficient (or a way to report on user action...