The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Allan Pardo
ServiceNow Employee
ServiceNow Employee

The following may help if you would require a report that tracks assignment group changes via the incident table. Having a historical view of Assignment Group changes can help a team or organization see where their incident categories have been assigned. It can also help tell a story of teams that regularly have to reroute work that takes up valuable time in their day. 

Within ServiceNow's reporting feature you can leverage the Assignment Group metric to get started.

Creating a report based on Assignment Group Changes via the Incident Table

One way of doing this is to use the out of the box metric definition (‘Assignment Group’) and use this as a filter in the report (using the ‘incident_metric’ ).

Step 1: Create a report with the following details:

Table name: incident_metric 
Type: List 
Configure: Choose the required columns (ID, Value, Assignment Group, Start,End). 
Group by: ID 
Add the filter condition: Definition--is--Assignment Group 
Save/Run the report

find_real_file.png

 

Although, this report tracks the assignment group changes, it is not that user friendly as one needs to refer to the Start and End values in order to determine the group re-assignments .

So, we can further enhance this by adding some customizations:

 

Step 2: Customize your report

You can make your report more user friendly with the following changes:

  • Create a custom field 
  • Create a Before business rule
  • Create a new metric definition

1. Create a custom field via the incident table to capture the previous assignment group value whenever incident is reassigned (to another group).

find_real_file.png

 

2. Create a Before Business Rule via the incident table in order to assign the previous group 

(function executeRule(current, previous /*null when async*/) {

// Add your code here
current.u_previous_assignment_group = previous.assignment_group.getDisplayValue();

})(current, previous);

 

3.   Create a new metric definition.

Via the metric definition, used the script below.  This  inserts a value into the incident_metric and assigns the current assignment group to the ‘value’ field if it’s the first assignment of a group ,  afterwards concatenates the value of previous assignment group and current assignment group for succeeding changes .

createMetric();

function createMetric() {

  var mi = new MetricInstance(definition, current);

  var gr = mi.getNewRecord();

  if (current.u_previous_assignment_group=="")  {

      gr.start = current.sys_updated_on;  //calculate start of assignment based on updated value

      gr.value = current.assignment_group.getDisplayValue(); //assign the current assignment group , first group assignment

  gr.calculation_complete = true;

  gr.insert();

}

else {

  gr.start = current.sys_updated_on; //calculate start of assignment based on updated value

//assign previous assignment group by concatening with the current assignment group , and use the value field

  gr.value = current.u_previous_assignment_group + ' -> ' + current.assignment_group.getDisplayValue();

  gr.calculation_complete = true;

  gr.insert();

} //if

}

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

find_real_file.png

 

4.   Open any existing Incident record and change the Assignment Group.

5.  Create a report to use the metric that was created in Step 3. i.e.  Filter should be ‘Definition is  Assignment Group Changes’

 

find_real_file.png

 

There you go, the report provides a nice layout of the Assignment Group changes.  In this example, note that the Incident was first assigned to the ‘ACME Support’ team, and then was reassigned to ‘Field Services’.

Another way of doing this one is to create a custom table and use a business rule to insert records (into the custom table) whenever there is an Assignment Group reassignment.   You can then create a report based out of the custom table.

 

NOTE :  This was tested on a London release and based on sample DEMO data.  For further information regarding Reporting and Metrics ,  please refer to the following documentation:

 

12 Comments