Reporting on all Incidents "touched" by a set of individuals

daburges
Kilo Expert

Hello all,

I am doing some metrics for members of my organization, we primarily track work done by a team via individual rather than assignment group. Therefore, when i check if an incident has been touched by a team I check if it was every assigned to a member of that team (which is a reference field that connects to the user table) .  

Recently, my co-worker requested a report on the number of incidents touched by the Help Desk team.

What I want: The requirements of the reports are relatively simple, just a single score for the number of incidents touched by our Help Desk team. This means any tickets that were either resolved by the team or were simply escalated, AKA assigned to another individual.

My initial attempts have been revolving around the Assigned to Duration Metric found in the [metric_definition] table. However, this metric creates a new instance every time an incident is assigned to the individual so if the incident was assigned to the same person twice or 2 different people on the team then data quality will be compromised since that will create two instances for a single incident.

Can anyone think of a way to get the distinct number of incidents a group of individuals has touched without duplicates?

Thank you for your time and patience.

18 REPLIES 18

Could confirm one thing? Is it a one shot report that will be used only once?


If it is information that is viewed periodically and data collection will be needed for the ongoing years, using PA is OK, but if it is only to get the value only once, it will be easier to run a GlideAggregate in a script and give the number to your users.


Basically,



Either option is fine as long as I have something that works. I still have yet to make either the PA aggregate work. and I don't know where I would start with the script.


Here is an idea for the script solution:



var inc = new GlideRecord("metric_instance");


inc.addEncodedQuery("definition=35f0791ac0a808ae008f0a2b1dc1030c"+


  "^startONLastyear@javascript:gs.beginningOfLastYear()@javascript:gs.endOfLastYear()"+


  "^value=User1"+


  "id=46e18c0fa9fe19810066a0083f76bd56");


inc.orderBy("ID");


var count=0;


var prev ="";


var current = "";




inc.query();




while (inc.next()){


  current = ""+ inc.id;


  if (prev!=current){


      prev = current;


      count = count+1;


      }


}



gs.log("incident count: " + count);



You just need to set the correct encoded query, execute the script and get its result from the logs.


I added comments to your settings:


------------------------


Data Collection Job: [incident_metrics]


Collection period: Last year (since this is our data requirement)


- Since OOB dashboards don't have incident_metric collections by default



Indicator Source:


Metric Definition = Assigned_to duration



Valid for frequency: yearly?


-> yes


-> 1.you need to add either "start date is this year" or "end date is this year" as constraint for the count to be correctly gathered for the year.



Automated indicator


Indicator source: Incident Metrics


aggregation: count distinct (INC Numbers)


Assigned to EMP1


OR Assigned to EMP 2


...


-------------------------



You may consider a manual indicator rather than an automated indicator.


But you need to have someone to enter the values manually.



2. with the automated indicator you can only set a monthly frequency. So if you need to have the value displayed only after the year is over you will need to test that the current month if January with an monthly period.


Then, to gather the data for the previous year, you just need your collection interval to be inside the previous year.


My Opinion (and everyone's got 'em): While PA may/may not do this, It isn't right to make users pay for a standard, critically needed data set. We do not have PA (not my choice)