Need to stop triggering additional comments notification for the first comments update

sanga2
Tera Contributor

Hi all, 

 

We have setup a notification on the update of the additional comments on the hr case ticket. However, we have a requirement where in we need to avoid triggering this notification for the first comment that has been updated on the ticket. 

 

I'm trying to trigger the notification through a business rule using the event trigger. Could you please help how can we achieve this functionality.

1 ACCEPTED SOLUTION

Tony Chatfield1
Kilo Patron

Hi, can you clarify\explain what you mean exactly by 'first comment that has been updated on the ticket'?
You do not want to send a notification for the first comment saved? regardless of who adds the comment (ESS user or fulfiller)? when it's added or how it's added?
If the comment field is mandatory at task creation and you are trying to stop a notification at insert you can include Updates ISNOT 0 in your notifications trigger conditions.

View solution in original post

3 REPLIES 3

Tony Chatfield1
Kilo Patron

Hi, can you clarify\explain what you mean exactly by 'first comment that has been updated on the ticket'?
You do not want to send a notification for the first comment saved? regardless of who adds the comment (ESS user or fulfiller)? when it's added or how it's added?
If the comment field is mandatory at task creation and you are trying to stop a notification at insert you can include Updates ISNOT 0 in your notifications trigger conditions.

Hi Tony,

 

Thanks for the reply. My requirement is simple, for the first additional comment added on the ticket, it should not trigger the notification. It doesnt matter who adds it and how it gets added.

 

Thanks.

Hi, I think the easiest solution would be to add a true\false field to your task table and use a before BR to update this from false to true the first time a comment is added to the record. You can then reference the field in your notification trigger conditions so that the notifications only trigger when the field is true.

//trigger condition
current.comments.changes() && current.customFieldName == false

//code
current.customFieldName = true;

This solution delivers your requirement with minimal customization, and doesn't require any changes to OOB code\functionality.

 

But,

as a business process I cannot think of any situation where this would be best practice.
With the result likely to cause inconsistencies and confusion with BAU operations and\or client users, and I would not recommend deploying it in the real world.