Capture the first person an incident was assigned to

amacqueen
Mega Guru

I have a need to capture this information for reporting is there anyone who can suggest a method by which I can do so?

Many thanks

1 ACCEPTED SOLUTION

Hi Angus,



you may need to update your script as below:



(function executeRule(current, previous) {


        current.u_first_assigned_to = current.assigned_to;


        current.update();


})(current, previous);




If above doesnt work, can you simply check for below: (changing the script to just below 2 lines)



      current.u_first_assigned_to = current.assigned_to;


        current.update();


View solution in original post

11 REPLIES 11

avinash kumar
Tera Expert

Hi,



There are some metric like Assigned to Duration which help you capture the assignment happening for incident. So whenever an incident is reassigned an entry is made here.


Metric-> Instances


Apply filter for the definition as Assigned to Duration and you would be able to find the entries. Now you can search for incident in the ID field and get the desired result and sort by created to get the first assignment person and the time when it was done.



Regards,


Avinash


Thanks for the reply Avinash, however Miriam is closer to what I was looking for.


Thank you, Avinash.  Just what I needed. 

Miriam Berg
Kilo Guru

Hi Angus,



You could create a field on the incident "first assigned to" where you save the value whenever it is first assigned.



1. First create a new field on the Incident table called "u_first_assigned_to", a Reference to the User table.



2. Then create an After Insert/Update business rule on the Incident table:


  • Advanced: true
  • Condition:

previous.assigned_to == "" && current.assigned_to != "" && previous.u_first_assigned_to ==""



  • Script:

(function executeRule(current, previous) {


        current.u_first_assigned_to = current.assigned_to;        


        current.update();


})(current, previous);



Hope this helps!



Best Regards,


Miriam