- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2022 02:11 AM
Hi,
I want to close incident task when incident is closed. When anyone close incident then it should check incident task has been closed or not if it incident task has been closed then incident should closed.
Can anyone please help me with this.
Regards,
Nivedita
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2022 02:18 AM
create an after update BR on incident table with condition state changes to closed, with below script:
var inc = new GlideaRecord('incident_task');
inc.addQuery('incident',current.sys_id);
inc.addEncodedQuery('stateIN-5,1,2'); // will check if task is not closed
inc.query();
while(inc.next())
{
inc.state=3; // will close the task
inc.update();
}
Please mark the answer correct/helpful accordingly.
Raghav
MVP 2023

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2022 11:54 AM
Point 1 can be controlled with Property I have mentioned, no additional thing is needed. For point 2 you need business rule , you can see below thread it has working code.
Feel free to accept multiple solutions if your query is answered.
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2022 03:16 AM
Hi,
Thank you for your reply.
I'm not able to open this link.
Regards,
Nivedita

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2022 03:48 AM
Replace with your instance name no ? I'm able to open it, replace 'instance' part with your instance name
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2022 04:51 AM
Hi,
Thank you so much for your reply.
There are many system properties available in both category and can you please explain me brief on that.
Can you please tell me with only system properties incident task getting closed.
Regards,
Nivedita

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2022 05:02 AM
Go to sys_properties.LIST then search for 'com.snc.incident.incident_task.closure' in Name field then open record and make 'Value' as 'true'
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2022 06:12 AM
Hi,
Thank you so much for your reply.
I have some doubts here :
1. We can close incident task when incident is closed with only system properties right and we don't need to create anything to achieve it.
2. Can we close incident when all incident task get closed like we do for requested item.
Can you please tell me what approach we should start to achieve it.
Regards,
Nivedita