
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2016 04:53 PM
Current State:
When someone replies to a Closed (Not Active) incident it updates that incident and does not change the state.
Desired State:
When someone replies to a Closed (Not Active) Incident it creates a new incident
Is there a standard or recommended solution for this?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2016 06:16 PM
Hi Ewan,
Here is one way you can open a new Incident in response instead of updating a closed INC...
Look in your Inbound Email Actions and find the one(s) used to Update Incidents, it should have the email Type set to 'Reply' (or possibly 'Forward') instead of 'New'.
- At the beginning of your IEA script, perform a check to see if the ticket has been closed (check whether it's active, or look for specific states):
if(current.active == false){
...
} - If the condition matches, just create a new Incident using a GlideRecord and fill in the blanks with info from your email and the existing closed Incident, I'd set the existing INC as the parent.
if(current.active == false){
var gr = new GlideRecord('incident');
gr.initialize();
gr.opened_by = email.from_sys_id;
gr.caller_id = email.from_sys_id;
gr.description = email.body;
gr.short_description = email.subject;
gr.parent = current.sys_id;
... (grab some other relevant info from your existing INC using 'current')
gr.insert();
(avoid the 'current.update()' statement somehow using a break, return, etc.)
}
else{
(perform your normal IEA update code)
...
}
See how that works out for you.
Thanks,
-Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2016 05:34 PM
It depend on the process what you are following. If you are allowing to users to reply the incident so that they inform about the issue is solved or not, then it should either update or reopened the same incident.
If closed incident means no further work can be done on this and can't be reopen then it should create new incident.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2016 06:16 PM
Hi Ewan,
Here is one way you can open a new Incident in response instead of updating a closed INC...
Look in your Inbound Email Actions and find the one(s) used to Update Incidents, it should have the email Type set to 'Reply' (or possibly 'Forward') instead of 'New'.
- At the beginning of your IEA script, perform a check to see if the ticket has been closed (check whether it's active, or look for specific states):
if(current.active == false){
...
} - If the condition matches, just create a new Incident using a GlideRecord and fill in the blanks with info from your email and the existing closed Incident, I'd set the existing INC as the parent.
if(current.active == false){
var gr = new GlideRecord('incident');
gr.initialize();
gr.opened_by = email.from_sys_id;
gr.caller_id = email.from_sys_id;
gr.description = email.body;
gr.short_description = email.subject;
gr.parent = current.sys_id;
... (grab some other relevant info from your existing INC using 'current')
gr.insert();
(avoid the 'current.update()' statement somehow using a break, return, etc.)
}
else{
(perform your normal IEA update code)
...
}
See how that works out for you.
Thanks,
-Brian

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2016 08:27 AM
Works! Thank you Brian.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2016 12:45 PM
Welcome.