Notification for Additional comments in Service Catalog task

mariapaskova
Kilo Contributor

Hello,

I'm experiencing an issue with a notification not sent to the task assignment group when a service catalog task is commented.

The Additional Comments section on the Catalog Task, is on   sc_task.request_item.comments

find_real_file.png

When I define the condition for "when to send", I don't see Additional comments in the list under Requested item fields.

find_real_file.png

I try to trigger the event with "Event is fired" instead of Insert/Update and defined a business rule on the requested item table, but it doesn't send the notification as well.

These are screenshots of the business rule, event registry and notification:

Notification:

find_real_file.png

Event registry:

find_real_file.png

Business rule:

find_real_file.png

If someone can help me with this issue will be great.

Thanks a lot in advance!

Maria

1 ACCEPTED SOLUTION

In the script where you trigger the event sc_req_item.commented you can add the following code:



var grpList = [];


var tsk = new GlideRecord('sc_task');


tsk.addQuery('request_item',current.sys_id);


tsk.addQuery('active','true');


tsk.query();


while (tsk.next()){


  grpList.push(tsk.assignment_group+'');


}



  gs.eventQueue("sc_req_item.commented",current, grpList.join(','),gs.getUserName());


View solution in original post

24 REPLIES 24

Now since you are registering event, do not make notification conditional.


Rather make it to fire when event is registered (I hope event is getting registered).



there is an option to make notification to fire when event is getting registered


This is what I see in the Event log:



find_real_file.png


events.JPG



Hello Maria,



If you see, event is getting registered which you have configured on sc_req_item.


Even name is sc_req_item.commented.




Now go to notification,


Configure notification on sc_task table, and define 'Send When' to even is fired   and 'Event Name'   to sc_req_item.commented. Do not define any condition now. This is now event driven notification and not he conditional one.




Add recipients in who will receive section and add message in what it will contain.



Kindly configure this and let me know if it works.


Hi Deepak,



yes I did it, but still the assignment group doesn't receive a notification:



find_real_file.png


find_real_file.png



find_real_file.png


I have done this before by triggering the email on the RITM table.   You will need to write a script to get the assignment groups for the open tasks and set in one of the parameter fields when the event is triggered.     The notification will need to send to 'parameter set'.