Reopen Resolved incidents when updated from email

Brian Sorensen
Giga Guru

We have come across an issue with the latest patch, and looking to see if something was not updated.

 

Previously when we Resolved an incident a user could reply to the email and it would re-open the incident and set the state from Resolved to In Progress.

Since the latest hot fix, this doesn't seem to happen.

The incident stays resolved and eventually closes, and the user then calls to complain that it was not fixed and only then do we catch that the incident was not re-opened.

 

Is there a business Rule or Inbound action I should review?

12 REPLIES 12

KKrabbenhoft
Tera Guru

@Brian Lancaster When I review the (Update Incident (BP) inbound action) There is no mailto script that I can find. that opens a new email with the subject line to Please reopen. I am relatively new to ServiceNow and would like to know how to solve this properly. Can you provide a suggestion toward a solution?

Here is a copy of the actions script from our inbound action if it helps

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("sn_incident_write") || 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;
}
 
if (gr.canWrite())
gr.update();
}

@Brian Sorensen I am still having the same issue after confirming the copy of teh action script you provided is the same as mine. Any other thoughts?

UPDATE:
I reviewed the inbound action and added that users need to add "please reopen" in the subject. This change resulted in the reply email working (sort of) the activity stream gets updated properly but the state is not changes from resolved state to the in-process state (2). The script below shows where I confirmed the [new Incident().reopen(gr, email)] does have what is needed to reopen the incident yet the incident state is not updating to [in progress]  
Anyone else having this issue? I am unable to resolve this at this point, I could use some guidance. 
Update Incident (BP) script is below. 

gs.include('validators');

if (current.getTableName() == "incident") {

    var gr = current;
        if (email.subject.toLowerCase().indexOf("please reopen") >= 0 && current.state == 6) {
        gr = new Incident().reopen(gr, email) || gr;
        
    }

    gr.comments = "reply from: " + email.origemail + "\n\n" + email.body_text;

    if (gs.hasRole("sn_incident_write") || 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;
    }

    if (gr.canWrite())
        gr.update();
}



KKrabbenhoft
Tera Guru

@Brian Sorensen try this, 

The **"Update Incident (BP)"** inbound email action wasn’t reopening incidents in a resolved state because it was not executing. The root cause was its **execution order set to 100**, which matched another inbound action, creating an unpredictable execution sequence. This action specifically requires the **subject line to contain "please reopen"** when replying. After adjusting the execution order from **100 to 99**, this action now runs first, successfully processing replies and reopening incidents by setting their state to **In Progress**.

 

Here is a post I created for this it goes into a bit more detail