Auto-populating work notes on Incidents

BigMikeyVegas
Tera Guru

I have seen in previous discussion threads where people have configured a business rule to auto-populate an e-mail address or end user to the watch list. I need to do the same, but I need to populate the work notes. I have seen discussions where via business rules the work notes field was populated when a person entered a work note, but I need to have specific people added to work notes for Priority 1 incidents or for Incidents for end users from a specific location.

Can anyone provide assistance. I am very green and looking to learn.

1 ACCEPTED SOLUTION

Everywhere you see watch_list, replace it with work_notes_list - that will put the email on Work notes list, but you'll have to confirm you have a notification that will send to that list.


View solution in original post

7 REPLIES 7

Michael Fry1
Kilo Patron

Can you clarify what you're trying to do? A business rule to populate work notes when work notes are entered? Specific people added to work notes for Priority 1 incidents, I'm assuming work notes should have been watch list? Give me some details, I'll see if I can help you out.


Sorry that the information I provided was a little convoluted.



Below is a copy of the business rule code that we used, however this only adds an e-mail or name to the Watchlist upon Incident creation. We need to add someone to the Work Notes upon Incident creation.




(function executeRule(current, previous /*null when async*/) {




var emailAddress = "MANAGEMENT@COMPANY.com";  


      if (current.watch_list.toString().indexOf(emailAddress) == -1) {  


              var watchList = current.watch_list.toString().split(",");  


              watchList.push(emailAddress + "");  


              current.watch_list = watchList.join(",");


}




})(current, previous);





Thank you again.


No worries.



So your code reads, set the variable emailAddress equal to the email address. Then if the current watch list doesn't contain the email address, split the watch list into comma separated choices, then add the email address and push back to the watch list.



When you say work notes, you mean Work Notes (watch) list?


BigMikeyVegas
Tera Guru

The above code will place the e-mail address in the Watch List (which only provides info based on Additional Comments entered by ITIL or End Users). We need the specified e-mail addresses to receive Work Notes List (which includes any Work Notes entered by ITIL users)



find_real_file.png