When the incident is reassigned it should trigger notification to previous assignment group and also when the incident state changes

Ashwini8
Tera Contributor

Hi All,

I have created a notofication to trigger when an incident is reassigned to another team , it will trigger notification to the previous assignment group. But now we have a requirement when the state of that incident changes to resolved/closed/cancelled also we need to trigger notification to previous assignment group. I tried adding condition in BR, but its not working. Any suggestions will be realy helpful for me. below are the script screen shots.

BR:

find_real_file.png

find_real_file.png

Event:

find_real_file.png

Notification:

In "when to" condition i just selected event fired and selected the event name, and in "who will recieve" i have checked event param 2. Please suggest me where i need to do the changes

 

Regards,

Tejaswini RG

 

1 ACCEPTED SOLUTION

asifnoor
Kilo Patron

Hi

Your BR will give you previous assignment group when it is changed. But later it will not be available. My suggestion is to add the members of the previous group to the watchlist so that whenever state changes the members of the watch list gets notification.

In the same Br you can fetch the users and can add to watch list

//fetch existing watchlist members
var watchlist = current.watch_list.toString().split(",");
var users=[];
for(i=0;i<watchlist.length;i++) {
  users.push(watchlist[i]);
}

var gr = new GlideRecord("sys_user_grmember");
gr.addQuery("group",previous.assignment_group);
gr.query();
while(gr.next()) {
  users.push(gr.getValue("user"));
}
current.watch_list=users.toString();
current.update();

Mark the comment as helpful/correct if this solves the problem.

 

View solution in original post

13 REPLIES 13

No, I cannot select filter condition in notification, its throwing error message that when we select trigger condition as event so we cannot add condition. I tried adding in BR also its not at all triggering notification.

Ah okay. 

So go to the BR where you care checking assignment group changes, add Or conditon

state changes.

and check ocne.

I added OR condition, but the notification is triggering only once when the assignment group changes, if the state changes its not triggering the notification, Not getting how to resolve this issue.

Can you share the BR screenshot When to run, advanced tabs.