Cleaning up users in RT db

I’m a Systems Librarian for a 56-member library consortium that has been using RT for around 8 years. One of the great strengths of RT is that it will accept incoming emails tickets from anyone. Library staff changes constantly. One of the great weaknesses of RT is that it will accept incoming email tickets from anyone. The user table is a mess with multiple entries for the same person.

Those of us in the central office (who are the moderators) have gone through an email domain change. The old domain is going to be shut off in a few months so I’m trying to clean things up. RT authenticates against an LDAP db which gets its user data from a Drupal interface. In RT itself, these central user accounts contain the old email domain. For any given person (there’s probably about 10 or 12), there’s a mix of owner, requestor, and cc with the old and new domains.

Since I see that the batch ticket change interface (we’re on 4.4.4) lets you reassign owners but not requestors, I’m guessing I’m going to need to make some of the changes directly in MySQL.

The plan is to get everything associated with a user on the account with the old domains (because that’s where the bulk of the stuff already is, it has the elevated permissions, and it has the correct user name), delete the account with the new domain, then change the email address on the first account to the new email domain.

Is there a better way of going about this? Is there anything special I need to watch out for? Thanks!

As the eco-system your RT is living in sounds like a bit of a mess (sorry!) I think your plan is probably the best line of attack. Some thoughts:

a) make sure you do backups!

b) make sure the “everything associated with a user” includes all the tickets, transactions, groups memberships and attachments you want to keep. Otherwise you might find things can get a bit confused.

Thanks GreenJimll. Backups, check! I just discovered the MergeUsers extension so I’m going to install that and see if it streamlines things. Fingers crossed! If anyone has words of wisdom, please volunteer them.

The MergeUsers extension did the trick: RT::Extension::MergeUsers - Merges two users into the same effective user - metacpan.org

1 Like