How to handle duplicate locations ?

PriyanshuVerma1
Tera Expert

Hey everyone,

 

We have few duplicate locations that are being used in user table records. We want to make the duplicate location inactive and also update the duplicate location with original location in user records.

 

Should I manually go to duplicate location record and remove users from there, and then pull up original location record and users to it? will this update the user records that had duplicate location with original location we want?

 

I am looking for best practices here

2 REPLIES 2

Mark Manders
Mega Patron

If you really want to get rid of the duplicate location, you can just delete it, after carefully go through all places where they can be used (tickets/cmdb/etc). Otherwise inactivating them can work, but you need to check on the reference qualifiers on the tables using the location table to ensure that you can only select active locations, otherwise you will have the same problem again very soon.

 

For correcting the current ones there are a few correction possibilities (manually/via script). If you inactivate the wrong ones, you can select all users (or other records) where the location.name is that location and the location record is inactive. You can then do an 'update all' and set the active location. Run the query again to see if it is resolved.

Correction via script works the same, you just script to the users with an inactive location and replace it with the active one.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

I just noticed location is being used in Incident records as well, it get populated withe user location when caller_id field is updated with some user id.

For incident record as well, i need to do the same manual, or via script  : the location.name is that location and the location record is inactive and update all records? or this would be done automatically if we update user records?