Description
This occurs because of two defects:
1. If no allowed reviewers are specified in the destination project (i.e. there is no restriction) we assume that the current moderator is not allowed to moderate in the new project, and attempt to replace them with the default moderator from the noew project. In fact we should not change the moderator, as no restriction is in force in the new project.
2. When we change moderators we don't check to see if the old and the new moderators are the same user – we remove the old and add the new regardless. For some reason Hibernate does not issue the SQL to remove the old moderator, and so the same user appears twice as a participant on the review, causing a constraint vialoation.