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

Thanks for that Miriam that is kind of the path I was going down however it didn't work.



My steps, create new reference field u_first_assigned_to on Sys User and added to Incident form.



Created after BR (Active, Advanced, Insert and Update)



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, previous);  



I've also tried 'When to Run | Filter Conditions left alone and Assigned To changes



Any other ideas?


I'll take another look at it.


What exactly was it that didn't work for you?


Thanks, the new field doesn't get populated with anything.


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();


Looks good so far Sumeet.



Many thanks