Forked from scherztc/gist:af5422e066221d60f18fbf58df412e17
Created
April 27, 2019 06:23
-
-
Save jayanthdeejay/62ad9956f1209045ac330edd6d92f0e8 to your computer and use it in GitHub Desktop.
Change ownership on works and files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
work_ids = ActiveFedora::SolrService.query('depositor_ssim:dungavjk@mail.uc.edu AND has_model_ssim:Article', fl: "id", rows: 1000) | |
work_ids.each do |work| | |
pid = work['id'] | |
article = Article.find(pid) | |
article.depositor = 'konecnmc@ucmail.uc.edu' | |
article.edit_users = ['konecnmc@ucmail.uc.edu'] | |
article.save | |
article.file_sets.each do |file| | |
file.depositor = 'konecnmc@ucmail.uc.edu' | |
file.edit_users = ['konecnmc@ucmail.uc.edu'] | |
file.creator = ['konecnmc@ucmail.uc.edu'] | |
file.save | |
end | |
end | |
Becks - Articles 52 | |
Peck - Articles 48 | |
Dunga - Article 1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment