Report to show list of tickets transferred from one Service Desk to Another

riaz_mansuri
Kilo Guru

I need to create a report which shows (weekly) tickets transferred from our UK Service Desk Group to our US Service Desk Group.

Not show how but it looks possible. Any ideas?

Thanks,

1 ACCEPTED SOLUTION

Brad's solution would make this very easy. The business rule could be a very simple before on update:


function onBefore(current, previous) {


  current.u_previous_assignment_group = previous.assignment_group; // Set previous Assignment Group to new field to hold it


}



Where u_previous_assignment_group is a reference field to sys_user_group, and add a When to Run when assignment group changes. You might want to add another glide_date_time field to track when the update to assignment group happened for reporting purposes, just in case the most recent updates were to different fields. That would just add something like this to the function:



var nowDT = gs.nowDateTime(); // Get Date Time


current.u_assignment_group_change_datetime = nowDT; // Set Date and Time to new field on table


View solution in original post

6 REPLIES 6

Brad Tilton
ServiceNow Employee
ServiceNow Employee

I don't really think there is a way to do this with the data out of box. You could look at the metric instance table, but I don't think it will get you all the way there.



I think you'd probably have to add another field to hold the previous assignment group or something like that.


Hi Brad,



That is a good idea I did not think of that. I am going to see if Geneva can do this, if not I will add that field.



Any idea what Script I can use to stamp the first Assignment group?



Cheers


Riaz


Brad's solution would make this very easy. The business rule could be a very simple before on update:


function onBefore(current, previous) {


  current.u_previous_assignment_group = previous.assignment_group; // Set previous Assignment Group to new field to hold it


}



Where u_previous_assignment_group is a reference field to sys_user_group, and add a When to Run when assignment group changes. You might want to add another glide_date_time field to track when the update to assignment group happened for reporting purposes, just in case the most recent updates were to different fields. That would just add something like this to the function:



var nowDT = gs.nowDateTime(); // Get Date Time


current.u_assignment_group_change_datetime = nowDT; // Set Date and Time to new field on table


Hi Robert,



I think ,business rule should be like..


function onBefore(current, previous) {


current.u_previous_assignment_group = current.assignment_group; // not previous



}



Please correct if I am wrong...



Thanks & Regards


Govind Kumar Sharma