Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Create metrics for RITM catalog task durations.

Rekha Tiwari
Kilo Guru

Hi Team,

I have to Create metrics for RITM catalog task durations.

How should I proceed on this. Please help me in this.

 

Thanks,

Rekha Tiwari

3 REPLIES 3

Tony K
Kilo Sage

check into the metric instance definition. I have used this in the past to measure how long specific tasks sit in a certain state. 

https://docs.servicenow.com/bundle/newyork-platform-administration/page/use/reporting/concept/c_Metr...

 

Mike_R
Kilo Patron
Kilo Patron

I created a calculated duration field on the task table. Works beautifully.

Also useful in finding duration of Requested Items (RITM)

find_real_file.png

I had the same idea, but I was wondering how one might handle RITM that are not yet closed?
Would you script it here as well, something like:

if (current.active==false){
  return gs.dateDiff(current.opened_at.getDisplayValue(),current.opened_at.getDisplayValue(),false);
}
else{
  return gs.dateDiff(current.opened_at.getDisplayValue(), gs.endOfToday(), false);
}

 

Or should I move the open RITM duration calculation to a separate business rule?  Will "onQuery" run the business rule when a report is generated?

Thanks!
Tim