<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Closing Incidents in Incident Management forum</title>
    <link>https://www.servicenow.com/community/incident-management-forum/closing-incidents/m-p/3552112#M14324</link>
    <description>&lt;P&gt;We need to make a change so that Incidents cannot be closed if they have open incident tasks. We have learned that users are closing incidents before others close out the incident tasks assigned to them. This results in the incident task being closed as incomplete.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone point me in the right direction for where this logic lives so that I can make a change?&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jun 2026 20:21:32 GMT</pubDate>
    <dc:creator>sseverance</dc:creator>
    <dc:date>2026-06-01T20:21:32Z</dc:date>
    <item>
      <title>Closing Incidents</title>
      <link>https://www.servicenow.com/community/incident-management-forum/closing-incidents/m-p/3552112#M14324</link>
      <description>&lt;P&gt;We need to make a change so that Incidents cannot be closed if they have open incident tasks. We have learned that users are closing incidents before others close out the incident tasks assigned to them. This results in the incident task being closed as incomplete.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone point me in the right direction for where this logic lives so that I can make a change?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2026 20:21:32 GMT</pubDate>
      <guid>https://www.servicenow.com/community/incident-management-forum/closing-incidents/m-p/3552112#M14324</guid>
      <dc:creator>sseverance</dc:creator>
      <dc:date>2026-06-01T20:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: Closing Incidents</title>
      <link>https://www.servicenow.com/community/incident-management-forum/closing-incidents/m-p/3552114#M14325</link>
      <description>&lt;P&gt;You may need to implement BR on incident table when someone try to resolve incident to check if there is any active incident task. bellow is sample script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;(function executeRule(current, previous /*null when async*/) {
    
    // Query the Incident Task table for any open/active tasks tied to this incident
    var taskGr = new GlideRecord('incident_task');
    taskGr.addQuery('incident', current.sys_id);
    taskGr.addActiveQuery(); // Checks for active = true
    taskGr.query();

    if (taskGr.hasNext()) {
        // Prevent the incident from being closed/resolved
        current.setAbortAction(true);
        
        // Display the user-friendly suggestion/warning
        gs.addErrorMessage('You cannot close this incident while there are open incident tasks. Please close all related incident tasks before closing the incident.');
    }

})(current, previous);
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;Please mark my answer correct and helpful if this works for you.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2026 20:27:37 GMT</pubDate>
      <guid>https://www.servicenow.com/community/incident-management-forum/closing-incidents/m-p/3552114#M14325</guid>
      <dc:creator>Gangadhar Ravi</dc:creator>
      <dc:date>2026-06-01T20:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Closing Incidents</title>
      <link>https://www.servicenow.com/community/incident-management-forum/closing-incidents/m-p/3552117#M14326</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/795029"&gt;@sseverance&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;you can create a &lt;/SPAN&gt;&lt;STRONG&gt;Before-Update Business Rule&lt;/STRONG&gt; on the incident table. This script queries the incident_task table for any open records linked to the parent Incident and stops the closure process if found.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;How to Configure the Business Rule&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;OL class=""&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Navigate to &lt;STRONG&gt;System Definition &amp;gt; Business Rules&lt;/STRONG&gt; and click New.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Fill out the form with the following details:&lt;/SPAN&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;Name:&lt;/STRONG&gt; Prevent Incident Closure with Open Tasks&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt; Incident&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;Active:&lt;/STRONG&gt; Checked&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;Advanced:&lt;/STRONG&gt; Checked&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Go to the &lt;STRONG&gt;When to run&lt;/STRONG&gt; tab and set the filter conditions:&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN class=""&gt;State changes to Closed ( depending on your business process)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;Script:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;(function executeRule(current, previous /*null when async*/) {&lt;BR /&gt;// Query the incident_task table for tasks related to this incident that are not closed&lt;BR /&gt;var task = new GlideRecord('incident_task');&lt;BR /&gt;task.addQuery('incident', current.sys_id); // Links to the parent incident&lt;BR /&gt;task.addEncodedQuery('stateNOT IN3,4,7');&amp;nbsp;&lt;BR /&gt;task.query();&lt;BR /&gt;&lt;BR /&gt;// If open tasks exist, abort the save and show an error message&lt;BR /&gt;if (task.hasNext()) {&lt;BR /&gt;gs.addErrorMessage('You cannot close this Incident because it has open Incident Tasks. Please close all related tasks first.');&lt;BR /&gt;current.setAbortAction(true);&lt;BR /&gt;}&lt;BR /&gt;})(current, previous);&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;4.Save and test it&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 01 Jun 2026 20:35:27 GMT</pubDate>
      <guid>https://www.servicenow.com/community/incident-management-forum/closing-incidents/m-p/3552117#M14326</guid>
      <dc:creator>PoonkodiS</dc:creator>
      <dc:date>2026-06-01T20:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Closing Incidents</title>
      <link>https://www.servicenow.com/community/incident-management-forum/closing-incidents/m-p/3552195#M14327</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/795029"&gt;@sseverance&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Create a Before Update BR and try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Navigate to &lt;STRONG&gt;System Definition &amp;gt; Business Rules&lt;/STRONG&gt; -&amp;gt; &lt;STRONG&gt;New&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Fill out the form with the following details:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Name:&lt;/STRONG&gt; Prevent close with open tasks&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt; Incident [incident]&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Active:&lt;/STRONG&gt; Checked&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Advanced:&lt;/STRONG&gt; Checked&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;When to run:&lt;/STRONG&gt;&lt;/LI&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;When:&lt;/STRONG&gt; Before&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Update:&lt;/STRONG&gt; Checked&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Filter Condition:&lt;/STRONG&gt; State changes to Resolved &lt;STRONG&gt;OR&lt;/STRONG&gt; State changes to Closed //update your required condition&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample script:&lt;/P&gt;&lt;P&gt;(function executeRule(current, previous /*null when async*/) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; var taskGr = new GlideRecord('incident_task');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; taskGr.addQuery('incident', current.sys_id);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; taskGr.addQuery('active', true);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; taskGr.query();&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (taskGr.hasNext()) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; current.setAbortAction(true);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gs.addErrorMessage(gs.getMessage('You cannot close or resolve this Incident because there are still open Incident Tasks. Please close all tasks first.'));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;})(current, previous);&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2026 03:53:27 GMT</pubDate>
      <guid>https://www.servicenow.com/community/incident-management-forum/closing-incidents/m-p/3552195#M14327</guid>
      <dc:creator>Tanushree Maiti</dc:creator>
      <dc:date>2026-06-02T03:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Closing Incidents</title>
      <link>https://www.servicenow.com/community/incident-management-forum/closing-incidents/m-p/3552220#M14328</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/795029"&gt;@sseverance&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can acheived this using before update&amp;nbsp; business rule :&lt;/P&gt;&lt;P&gt;condition&amp;nbsp; : state changes to closed / resolve&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var incTask=new GlideRecord('incident_task');&lt;/P&gt;&lt;P&gt;incTask.addQuery("incident",current.sys_id);&lt;/P&gt;&lt;P&gt;incTask.query();&lt;/P&gt;&lt;P&gt;while(incTask.next())&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;if(incTask.state!=3 ||&amp;nbsp;incTask.state!=4)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;current.setAbortAction(true);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;gs.addErrorMessage('Incident taska are not completed ')&lt;/P&gt;&lt;P&gt;break;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if this helps you then mark it as helpful and accept as solution.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2026 05:19:33 GMT</pubDate>
      <guid>https://www.servicenow.com/community/incident-management-forum/closing-incidents/m-p/3552220#M14328</guid>
      <dc:creator>Aditya_hublikar</dc:creator>
      <dc:date>2026-06-02T05:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Closing Incidents</title>
      <link>https://www.servicenow.com/community/incident-management-forum/closing-incidents/m-p/3556364#M14379</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/795029"&gt;@sseverance&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope you are doing well . Does my response helps you ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If my response helps you then mark it as helpful and accept as solution.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2026 12:47:42 GMT</pubDate>
      <guid>https://www.servicenow.com/community/incident-management-forum/closing-incidents/m-p/3556364#M14379</guid>
      <dc:creator>Aditya_hublikar</dc:creator>
      <dc:date>2026-06-09T12:47:42Z</dc:date>
    </item>
  </channel>
</rss>

