How do we stop closed incidents being reopened by the user whlist allowing resolved incidents to be reopened?

Rob C
Kilo Contributor

We found a comment on the service now documentation that says a user can't reopen a closed incident but can open a new incident which uses the closed incident as source (not sure what that means in practice), by replying to any email about their original incident and using the subject "please reopen". We tried this and instead of opening a new incident and referencing the closed incident (linking?) the original incident state was changed from closed to active.

 

Any help on what we need to change to prevent closed incidents being re-opened?

13 REPLIES 13

 

The original has gone, will try to create a OOTB version...

Here's the original (BP) script's code:

gs.include('validators');

if (current.getTableName() == "incident") {
	
	var gr = current;
	
	if (email.subject.toLowerCase().indexOf("please reopen") >= 0)
		gr = new Incident().reopen(gr, email) || gr;
	
	gr.comments = "reply from: " + email.origemail + "\n\n" + email.body_text;
	
	if (gs.hasRole("itil")) {
		if (email.body.assign != undefined)
			gr.assigned_to = email.body.assign;
		
		if (email.body.priority != undefined && isNumeric(email.body.priority))
			gr.priority = email.body.priority;
	}
	
	gr.update();
}

There should be no Field Actions selected.

When to run tab: Execution Order = 100, No conditions/filters, Type = Reply

Rob C
Kilo Contributor

We've amended our Update Incident (BP) naming it back to the OOTB and checking it against your copy of the script and taking out the state change condition. But we are still getting the result of a closed call being reopened and set to the state of active (state = 2). We've checked the IncidentSNC and it is also fine and hasn't been modified.

What do we check next?

Rob C
Kilo Contributor

Still having problems with this. Checked all the information you guys have supplied and all looks fine. We have a Inbound Email Action Reopen Incident. How does this come into play with Update Incident (BP)?