Email to Assignment Group Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2013 06:44 AM
I've had a request for an email to be sent to the Manager of 3 assignment groups to receive an email when an incident is assigned to one of those 3 groups regardless of whether the incident was assigned to an individual in one of those groups.
I have got the email template and the email itself set to restrict sending to only the manager of those groups and in the 'User Field' in the email notification I have 'manager'. However the email doesn't get sent, I am using the 'incident.assigned.to.group' event which in turn calls the 'incident events' business rule'.
The business rule is as follows:-
if (current.operation() != 'insert' && current.comments.changes()) {
gs.eventQueue("incident.commented", current, gs.getUserID(), gs.getUserName());
}
if (current.operation() == 'insert') {
gs.eventQueue("incident.inserted", current, gs.getUserID(), gs.getUserName());
}
if (current.operation() == 'update') {
gs.eventQueue("incident.updated", current, gs.getUserID(), gs.getUserName());
}
if (!current.assigned_to.nil() && current.assigned_to.changes()) {
gs.eventQueue("incident.assigned", current, current.assigned_to.getDisplayValue() , previous.assigned_to.getDisplayValue());
}
if (!current.assignment_group.nil() && current.assignment_group.changes()) {
gs.eventQueue("incident.assigned.to.group", current, current.assignment_group.getDisplayValue() , previous.assignment_group.getDisplayValue());
}
if (current.priority.changes() && current.priority == 1) {
gs.eventQueue("incident.priority.1", current, current.priority, previous.priority);
}
if (current.severity.changes() && current.severity== 1) {
gs.eventQueue("incident.severity.1", current, current.severity, previous.severity);
}
if (current.escalation.changes() && current.escalation > previous.escalation && previous.escalation != -1) {
gs.eventQueue("incident.escalated", current, current.escalation , previous.escalation );
}
if (current.active.changesTo(false)) {
gs.eventQueue("incident.inactive", current, current.incident_state, previous.incident_state);
gs.workflowFlush(current);
}
if (current.incident_state.changesTo(11)) {
gs.eventQueue("incident.updaterequired", current, current.assigned_to.sys_id, previous.incident_state);
}
Any help in getting this resolved would be gratefully accepted.
TIA
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2013 07:34 AM
Any help appreciated, thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2013 08:44 AM
Whenever I am setting these up I go through three steps:
1) Create the Event name/description within the "Registry"
2) Create the Business Rule (or in your case modify the Business Rule)
3) Create the Email Notification/Template
My first question to you would be, do you have the Event (incident.assigned.to.group) already created in the Event Registry? If so, is it associated with the email notification in question? It sounds like this is already done in your case but I know my experience with Email Notifications/Business Rules/etc out of the box is that they are very poor.
Once you have verified this I would go ahead and put in a "gs.log" command within your business rule so that you can debug it. This will tell you if it reaches the condition you expect it to ( if (!current.assignment_group.nil() && current.assignment_group.changes()) ). Provided it reaches this condition I would then create a blank/near empty email notification with NO conditions and configure it to fire on this event. Then we know it's something you've put in your notification, such as the logic behind the "manager". You may have already reached this step but I thought I'd type it out in case you haven't.
If you're already at this point what are you putting in for the "manager" in the user field? I believe the field would look something like current.incident.assigned_to.manager (I do not use this but I believe it is called in this manner based on other notifications).
As well, if the problem is based on sending to "manager" you can always pass that value into the email notification and just call it (through the parm ability). This is by far the easiest solution if the above way of calling it does not work.