stop email notifications when assigning incident to myself
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2016 08:50 AM
I'm trying to setup outbound emails to only send out emails if another user assigns the ticket.
Example: If a service desk tech assigns themselves an incident. No email
If a manager/or other service desk tech assigns an incident to a different tech. Send email
My current script now is:
current.sys_updated_by!=current.assigned_to;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2016 08:58 AM
Write an after Business rule on the table
With the condition -
curent.assigned_to.changes() && !gs.nil(current.assigned_to) && current.assigned_to != gs.getUserID()
In the script section -
gs.eventQueue('notify_incident.assignment', current, current.assigned_to, '');
In the notification, make sure you uncheck Send to event creater checkbox
Mark if it is helpful or correct, feedback is appreciated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2016 12:35 PM
When I created this business rule I was getting an error when testing.
The error said " curent.assigned_to.changes() && !gs.nil(current.assigned_to) && current.assigned_to != gs.getUserID() Skipping business rule"
Thank you for your feed back and please let me know if there is anything else I can try.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2016 08:38 PM
Could you please remove the condition field instead bring those inside the script to print it out -
want to debug what values its being returned -
Clear off the condition field (so this BR will trigger)
In script, print the values
gs.log('Assigned to changes: ' + current.assigned_to.changes(), 'debugBusinessrule');
gs.log('Assigned to NULL or NOT: ' + !gs.nil(current.assigned_to), 'debugBusinessrule');
gs.log('Current Assigned to: ' + current.assigned_to, 'debugBusinessrule');
Assign the incident to you and please check the log statements, is it coming as expected or not
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2016 08:59 AM