- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2024 10:23 PM
Hi Folks,
What is the best way to get the inactive user replaced with their manager wherever they are referenced in ServiceNow.
Few sample fields: caller/Requested for, Assigned to, Watchlist, Report sharing, Run As in scheduled Job, Owned by, Group Manager, Group Team Lead.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2024 11:25 PM
I think you should look at this requirement again.
Why would you want open tickets to be kept open, if the user that called it in is inactive? Just close them. Why would you want reports that someone does not have access to at the moment, suddenly be made available for them (manager). Often a manager needs information on a higher level and has no need for the information.
If you have scheduled jobs running as users, you should really revisit that practice. And also: by changing this just one-on-one doesn't solve anything. I have admin rights on the instance, my manager doesn't. So a job running in my name for admin stuff, gets results, running as my manager, doesn't (and the manager wouldn't even know the job is running in his name).
I fully understand the 'assigned to', although: are you sure the manager is part of the same groups as the inactive user, in case there are dependencies between assignment group/assigned to? Shouldn't this be assigned to another member of the assignment group?
Owned by (in case it's CMDB, not assets) makes sense, as well as group manager and group team lead, as long as it is also notified to the manager that he needs to take a look at it, because it's probably not him that is supposed to be there, but the replacement of the inactive user.
How to do it? Create a fix script for all tables you are searching for and replace the users. You have luck on some inherited tables (owned by on cmdb_ci, assigned_to on task), but you will need to specify it for others (caller, requested_for are different fields). Also: don't replace 'watchlist' one on one, because you will overwrite the entire list field. Make sure just to replace the user's sys_id with that of the manager (although I also think this is something that doesn't make sense to do).
Tip: create a dashboard from what you want/need to change if a user is inactive, so it's easy to just see if an update is necessary. If your script works (and it is always the same), you can just run it on querying for the fields containing an inactive user and do a replacement by the inactive user's manager. But, please, check first if you really want to replace it, because on some of them, it doesn't make sense to me.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2024 11:25 PM
I think you should look at this requirement again.
Why would you want open tickets to be kept open, if the user that called it in is inactive? Just close them. Why would you want reports that someone does not have access to at the moment, suddenly be made available for them (manager). Often a manager needs information on a higher level and has no need for the information.
If you have scheduled jobs running as users, you should really revisit that practice. And also: by changing this just one-on-one doesn't solve anything. I have admin rights on the instance, my manager doesn't. So a job running in my name for admin stuff, gets results, running as my manager, doesn't (and the manager wouldn't even know the job is running in his name).
I fully understand the 'assigned to', although: are you sure the manager is part of the same groups as the inactive user, in case there are dependencies between assignment group/assigned to? Shouldn't this be assigned to another member of the assignment group?
Owned by (in case it's CMDB, not assets) makes sense, as well as group manager and group team lead, as long as it is also notified to the manager that he needs to take a look at it, because it's probably not him that is supposed to be there, but the replacement of the inactive user.
How to do it? Create a fix script for all tables you are searching for and replace the users. You have luck on some inherited tables (owned by on cmdb_ci, assigned_to on task), but you will need to specify it for others (caller, requested_for are different fields). Also: don't replace 'watchlist' one on one, because you will overwrite the entire list field. Make sure just to replace the user's sys_id with that of the manager (although I also think this is something that doesn't make sense to do).
Tip: create a dashboard from what you want/need to change if a user is inactive, so it's easy to just see if an update is necessary. If your script works (and it is always the same), you can just run it on querying for the fields containing an inactive user and do a replacement by the inactive user's manager. But, please, check first if you really want to replace it, because on some of them, it doesn't make sense to me.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2024 11:36 PM
@Mark Manders your opinions stands valid for me.