openhatch / oh-greenhouse

Greenhouse -- a (temporary?) project to help track new contributors to open source projects. Might migrate to oh-mainline eventually.
GNU Affero General Public License v3.0
5 stars 7 forks source link

Merging duplicate identities #26

Closed daveeloo closed 11 years ago

daveeloo commented 11 years ago

Add schema migration so Upload gets original_email_changer column

Perform a data migration to make original_email and email the same for existing data (Editor's note: http://south.readthedocs.org/en/latest/tutorial/part3.html )

Change the database models to deal with duplicated IDs

-make email an index instead of the pk (models + schema migration) -make original_email unique (models + schema migration) -add authoritative BooleanField, currently with default to true

Create model method for merging -make the email of the unauthoritative identity the email of the authoritative identity -changes all upload email_changer to authoritative email -merge the fields first_upload, last_upload, ubuntu_dev, total_uploads, and contacts for the authoritative identity -note in commit log that contacts can't be recreated, but it won't be a problem in v2 b/c the comments framework is deprecated

Make views deal with only querying authoritative identies -change group base -change contributor list to only take authoritative identities -make person_detail only fetch the email that is the authoritative

Change import commands to set the new fields being used for merging identities -migrate-upload-data should create uploads with original_email -change People.get_or_create to include original_email

Make the frontend work for merging identities -create datalist in person.html with the format

Change person.html so it is using a form to post the changes

daveeloo commented 11 years ago

Argh, I forgot to write the issue # on all of my commit logs.