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

I haven't tried it, but I think both would work and be the same, since it's a before BR and there hasn't been a change yet.


  • current: The current record being referenced.
  • previous: The record before any changes were made, available on update and delete operations.

Scripting in Business Rules - ServiceNow Wiki



I prefer to use previous just to help me follow what the script is doing.


Hi,



Thank you both. I used:


current.u_previous_assignment_group = previous.assignment_group;



Where current.u_previous_assignment_group is my new refernce field. I also made this read only.



The Business rule runs when assigment group changes.



Thank you


Riaz