is it possible to move reviews from one user that needs to be deleted to another user that will remain as an active user?

Seth Floyd October 10, 2011

is it possible to move reviews from one user that needs to be deleted to another user that will remain as an active user?

Im trying to clean up users inorder to create a new one and I have 2 users id like to delete but they have reviews I need to keep. Is there a way to move those reviews to another user?

1 answer

1 accepted

0 votes
Answer accepted
Pierre-Etienne Poirot
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 16, 2011

Hi Seth,

It's possible but you will have to modify the database directly:

  • generate a backup of the Crucible instance (in Admin/Backup)
  • stop Crucible
  • find the primary key of the user you want to delete:
select cru_user_id from cru_user where cru_user_name = 'user_to_delete'

  • find the primary key of the user you want to keep:
select cru_user_id from cru_user where cru_user_name = 'user_to_keep'

  • update all the reviews, review comments and review participants to switch them from the old user to the other one:
update cru_comment set cru_user_id = 'id_user_to_keep' where cru_user_id = 'id_user_to_delete';
update cru_comment_read_status set cru_user = 'id_user_to_keep' where cru_user = 'id_user_to_delete';
update cru_review_participant set cru_user = 'id_user_to_keep' where cru_user = 'id_user_to_delete';
update cru_review set cru_creator = 'id_user_to_keep' where cru_creator = 'id_user_to_delete';
  • start Crucible
  • in the Admin, if the user to delete is a moderator, default reviewer and default review participant in any project, remove him or her from the project's setting (using the button 'Edit' in the 'Crucible settings' column for each project)
Marek Parfianowicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 22, 2016

You may also want to update the review history:

see the cru_logitem table, the cru_user_id column

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events