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?

kishor kumar3
Tera Contributor

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

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

So you can use after update BR on sys_user

Condition: Active Changes to False

What script did you start with?

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

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

Hi,

share the script you started with?

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Sumit Pandey1
Kilo Guru

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 🙂