Closed jamesvanmil closed 5 years ago
I created a new work and some batch works on scholar-dev on behalf of another user and I then verified that on_behalf_of
was properly set to the user for which I was creating the work on behalf of.
So I don't think we currently have a bug with proxies. We probably just need to clean up works that were created by proxies before the migration.
@jamesvanmil Do you think that cleaning up existing works is just a matter of finding all works created by proxies (i.e. work.proxy_depositor.is_a? String
) and then setting work.on_behalf_of = work.depositor
for each of those works?
This job did not work for a batch of works submitted by a proxy.
https://github.com/uclibs/scholar_uc/blob/develop/app/jobs/proxy_edit_removal_job.rb
Determined that the
#on_behalf_of
attribute was not set for the works. It looks like it's supposed to be set on work creation.Start by replicating the issue by creating some new works as a proxy, to see if the
#on_behalf_of
field is being set.