if a user is inactive I need to close all tickets created by the user and also assigned to him someone help me with this requirement?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 11:12 PM
if a user is inactive I need to close all tickets created by the user and also assigned to him someone help me with this requirement? I need to write a business rule for this requirement
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 11:19 PM
Hi,
So you can use after update BR on sys_user
Condition: Active Changes to False
What script did you start with?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 11:29 PM
Hi,
start the script with gliding the incident table in the script I need to close the ticket for inactive user example : user-David miller he is inactive i need to close the tickets in new, in progress and onhold
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 11:35 PM
Hi,
share the script you started with?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 11:23 PM
Hello Kishor,
I won't suggest that you close incidents assigned to that user instead maybe just remove the assigned to and update worknotes. Closing the incident could be frustating for the caller as the issue is still not resolved.
For technical solution, this could be an Async business rule on sys_user table or even a scheduled job which runs every hour.
For async business rule, the condition could be - Active changes to false
Script -
1) GlideRecord to the incident table and query the incident assigned to the user.
2) Update the assigned to field to empty and update the worknotes.
Let me know if you come across any challenges while writing the script, happy to help 🙂