Difference between revisions of "How to move deposits between users"

From EPrints Documentation
Jump to: navigation, search
m (Reverted edit of Am6Ek5, changed back to last version by WikiSysop)
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
This is the recipie for changing who apparently deposited an eprint. It requires logging into mysql and running the commands by hand.
+
[[Category:Howto]]
 +
[[Category:Management]]
  
First you need to know the userid number of the "from" user and the "to" user. Given their usernames we can find out their userid's. Replace USERNAME_GOES_HERE with the username of the user you want to find the ID of.
+
To change the owner of a eprint you need to have editorial privileges for that item and know the username of the user to transfer ownership to.
  
SELECT userid FROM users WHERE username='USERNAME_GOES_HERE';
+
# View the item
 
+
# Under the ''Actions'' tab click '''Change Owner''' (if you don't see ''Editorial Actions'' then you don't have the correct privileges)
The response will be something like this:
+
# Enter the username of the user to transfer ownership to and click '''Change'''
 
 
+--------+
 
| userid |
 
+--------+
 
|    23 |
 
+--------+
 
1 row in set (0.00 sec)
 
 
 
That means they are userid 23. Do this for both the user you are moving eprints from and the one you are moving them to.
 
 
 
!! Moving EPrints in the live repository
 
 
 
To just transfer eprints in the main repository: (replace TO_USERID and FROM_USERID with the numbers you just found out).
 
 
 
UPDATE archive SET userid=TO_USER_ID WHERE userid=FROM_USER_ID;
 
 
 
!! Moving all EPrints
 
 
 
If you want to apppy the change to the user workarea, editorial review etc. you need to run the SQL for all four tables:
 
 
 
UPDATE inbox SET userid=TO_USER_ID WHERE userid=FROM_USER_ID;
 
UPDATE archive SET userid=TO_USER_ID WHERE userid=FROM_USER_ID;
 
UPDATE buffer SET userid=TO_USER_ID WHERE userid=FROM_USER_ID;
 
UPDATE deletion SET userid=TO_USER_ID WHERE userid=FROM_USER_ID;
 
 
 
!! Metadata (abstract) pages
 
 
 
The eprint metadata summary pages will not be updated with this new information until you run:
 
/bin/generate_abstracts ARCHIVE_ID
 

Latest revision as of 10:45, 9 December 2011


To change the owner of a eprint you need to have editorial privileges for that item and know the username of the user to transfer ownership to.

  1. View the item
  2. Under the Actions tab click Change Owner (if you don't see Editorial Actions then you don't have the correct privileges)
  3. Enter the username of the user to transfer ownership to and click Change