Notification firing twice

Kai Tingey
Tera Guru

Hi All

I'm having what appears to be a common problem, although none of the solutions i've found via google-fu has helped me yet.

I have two email notifications configured that are both resulting in duplicate emails

the first is Incident commented for ITIL (notifies assigned to user that someone has made a comment on the job)

the second is Incident commented for ESS (notifies caller that a comment has been made on their job)

The main difference between the two is the 'who will receive' in the notification, and some minor template differences.

In both cases the following is true:

  • email content is exactly the same
  • email is fired from the relevant notification (not some other thing calling the email)
  • emails are sent at exactly the same time
  • one email is sent, the other is send-ignored
  • notification is triggered via filter conditions (see screenshot below for example)
  • disabling the notification results in no emails being sent (indicating that it is not 2 different sources calling the same notification)
  • Comments are not being duplicated in the incident record (if i look at history i can see only one entry, it does not appear to be updating twice)

here is a screenshot of the notification filter conditions for the ITIL one:

find_real_file.png

find_real_file.png

and the email queue:

find_real_file.png

the audit history (offending comment highlighted, i've been testing so ignore the previous one - that also triggered 2)

find_real_file.png

 

 

7 REPLIES 7

No NaME
Mega Guru

Hi,

Worth checking the email log of the notification which is getting ignored and see why it is getting ignored. It is self explanatory.

 

find_real_file.png

SanjivMeher
Kilo Patron
Kilo Patron

Do you have a on-Before business rule which has current.update(). If so, remove that and try again.


Please mark this response as correct or helpful if it assisted you with your question.

Nothing that is on-Before.

 

I have 2 on-After BR's with current.update() in them on the incident table

 

1. populte SLA due field - user created

var gr = new GlideRecord("task_sla");
gr.addQuery("task", current.sys_id);
gr.orderBy("planned_end_time");
gr.query();
if (gr.next()) {
gs.addInfoMessage("Planned end " + gr.planned_end_time);
current.sla_due = gr.planned_end_time;
current.update();
}

2. Run remediations for CMDB health - oob

var remediations = SNC.RemediationUtil.getRemediationsForTask(current.sys_id, true);

for (var i=0; i<remediations.length; i++) {
	var remed = remediations[i];

	var id = remed.sys_id;
	var name = remed.name;
	var workflow = remed.workflow;
	var wfName = remed.workflow_name;
	
	var cntx = new Workflow().startFlow(workflow, current, null, null);
	
	var msg = buildMessage(id, name, workflow, wfName, cntx);
	current.work_notes = msg;
	current.update();
}

function buildMessage(id, name, workflow, wfName, wfContext) {
	return	'Workflow \"' + wfName + '\" ('+workflow + ') started '+
	'per remediation rule \"' + name + '\" (' + id + '). ';
	// 'Check Workflow Context ' + wfContext + 'for progress.';
}

Thomas G
Tera Guru

Did you find a solution for this one, Kai?
I have the exact same problem. Actually with the same notification types too. Most of the time they fire twice. One gets send and the other ignored but sometimes both are ignored or both gets send and I simply can't wrap my head around why that happens.

Best regards
Thomas