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.

Assignment Group Duration of Incident Excluding OnHold Time

Muskan Hans2
Tera Contributor

Hi, 

 

I am working on one task where the user asked that he wants to, 

 

How long each assignment group spent on that incident excluding On Hold time. Incident can be reassigned to n number of assignment groups. So what i dd is I calculated the time for each assignment group by scripting. 

 

Lets say Group A was assigned an incident1 at 12:00 pm , Group A assigned the incident1 to Group B at 12:15pm. 

So now, i know Group A spent 15 minutes on it. 

 

Second, Let's say Group A didn't work on the incident1 from 12:05pm to 12:10 pm. This 5 minutes duration is calculated by Incident State Duration metric definition. 

 

Now i have both the calculations. i know in total Group A spent only 10 minutes on the task. 

 

How can i create a report based on this. I want to have time for assignment group excluding pending time. My scripts for metric definitions are calculating the time correctly. Any suggestion? 

 

8 REPLIES 8

@Muskan Hans2 I understood your query may be I have not put forward in a correct way. 
I shall try on my instance and get back on this for you. 

Please mark this as helpful and accept it as a solution if this resolves your query.

Thanks,

Sujatha V.M.

Please mark this as helpful and accept it as a solution if this resolves your query.
Sujatha V.M.

Thank you Sujatha, all the information is stored on metric_instance table, Please help me to figure out a way to create a report. I know there is a way remote table but excluding pending time from each record seems too much. I appreciate your help. 

 

Thank you 

Hi sujatha, did you figure it out ? 

Kiranmai_KVL
Kilo Sage

Hi Muskan,

 

Did you get a solution for this?