Raj118
Tera Contributor

Hello,

 

You can accomplish this with a simple Business rule. 

Since there is a an out of box email notification 'Incident worknoted for ITIL' and the recipients are 'Assigned to' and 'Work notes list', I would add the caller to the 'work notes list' if the caller has 'itil' role.

 

Script : 

 

Trigger  On Insert and 'Caller' is not empty

 

Script:

//Get caller
var user = gs.getUserByID(current.getValue('caller'));
//Cehck if caller has 'itil' role
var hasItil = user.hasRole('itil');
if(hasItil){
      //Add caller to the work notes list if current work notes list is empty
       if(current.work_notes_list.nil())
           current.work_notes_list  = current.caller.sys_id;
       else
    //APPEND caller to the work notes list if current caller list is  not empty
            current.work_notes_list  += ','+'current.caller.sys_id;
}
	

 

 

Hope you find this helpful!

 

Thanks!

Raj