This started in response to a question on the roundup irc channel.
A user had two accounts with two different email addresses and wanted to merge the two accounts.
What follows are suggested (but UNTESTED) steps to do this.
- Determine the primary account and the secondary account. We will merge the secondary account into the primary and retire the secondary
account.
For this example assume the primary account has the username prime and an email of prime@example.com. The secondary account has username seco with an email of seco@example2.com. - View the secondary account item. On this page, record the email and any alternate email addresses. Change the email address to a dummy
address. For example seco@example2.com -> seco@merged_to_prime.com. Remove any alternate addresses as well.
(If you are not going to purge the secondary account (i.e. you are skipping steps 4-8), you can change the email to seco+disabled@example2.com. This may allow the user to be notified of changes if the secondary account is on a nosy list. It depends on the MTA at example2.com handling subaddressing (aka plus addressing).) Add the original secondary address (seco@example2.com) to the alternate address field on primary account screen. (The email addresses must be unique hence the need to change it on the secondary user screen first). Add any alternate addresses on the secondary account to the alternate addresses on the primary account. Now any email that comes from seco@example2.com will be associated with the primary user account.
- Now change the nosy lists replacing the secondary user with the primary user. After this is done updates to the issues will go the email address of the primary account.
- Use:
roundup-admin -i <tracker_dir> -s find issue nosy=<secondary user id>
This produces a space separated list of issue id's that have the secondary user id on the nosy list. - Use that list in a shell for loop to run:
roundup-admin -i <tracker_dir> set issue<issue id> nosy=+<primary user id>
This will add the primary user to all the issues where the secondary user was a member. - Now we can delete the secondary user:
roundup-admin -i <tracker_dir> set issue<issue id> nosy=-<secondary user id>
(Caution: do not use nosy=<id>. This form does not edit the nosy list by removing the secondary user. It sets the nosy list to only the secondary user.)
- Once the secondary user has been removed from the nosy list. You should retire the secondary user with:
roundup-admin -i <tracker_dir> retire user<secondary user id>
If both the primary and secondary user id's are already in the nosy list, step 6 is a no-op.
After this change only the email address (not alternate addresses) of the primary user will be used to send notifications.
Retiring a user removes it from user listing (select boxes etc.). But it is still shown if it is in use as an assigned to user or other user class reference.