Merge Requests (RITMs, Tasks) and Incidents from User to User
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2022 03:51 PM - edited 11-17-2022 03:52 PM
Hi,
We have some users that changed names and ended up accidentally having multiple ServiceNow accounts. For some users that have dozens of ticket history under the old name (UserA) and just a couple tickets under new name (UserB).
I am thinking we would need to have script to query sc_req_item with UserA's sysid for requested_for, then for each RITM query for any Task associated with same user sysid -- then update requested_for for all the RITMs and Tasks to UserB. And, for incident query incident table for all incidents where caller_id is UserA sysid and update all those incidents to UserB's sysid. I am guessing for the RITMs/Tasks is not that straightforward and might be tricky since there is a flow that operates to generate Tasks from the RITMs....and maybe might be more straightforward for Incidents.
Does anyone have an example script to merge all requests (RITMs, Tasks) and incidents from UserA to UserB? I would prefer to not have to manually manipulate individual records to change from UserA to UserB but if scripting this would be more problematic we might just have to do things manually.... Any procedures/scripts, etc. would be appreciated. If there is an existing tool to handle this situation please let me know!
Best,
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2022 09:38 AM
Not sure the volume of records that you're reviewing for each of the user accounts. However, it may be just as easy to update the affected user or requested for value by using the list editor.