- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2023 09:44 AM
Hi All,
I have a requirement of excluding Priority 1 and Priority 2 tickets from auto-closure. I tried adding filter condition in the Business Rule but it still closed P1 and P2 incidents.
Business Rule Name : incident autoclose
Condition : Priority is not P1 or P2
script:
If anyone can help
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2023 01:49 PM
Right below the following line:
var gr = new GlideRecord('incident');
add the following line
gr.addQuery('priority', 'NOT IN', '1,2');
This tells the script to only target Incidents for which the priority is NOT 1 or 2.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2023 01:49 PM
Right below the following line:
var gr = new GlideRecord('incident');
add the following line
gr.addQuery('priority', 'NOT IN', '1,2');
This tells the script to only target Incidents for which the priority is NOT 1 or 2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2023 04:51 PM
Thanks for the help!!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2024 05:04 AM
Hi Drex, i know that this is an old post, but was this solution working for you?