uclibs / scholar_uc_legacy

Source code for Scholar@UC up to version 3.x. Replaced by ucrate
Other
5 stars 1 forks source link

Proxy remove job not working #1945

Closed jamesvanmil closed 5 years ago

jamesvanmil commented 6 years ago

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.

hortongn commented 6 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.

hortongn commented 6 years ago

@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?

hortongn commented 5 years ago

Moved to https://github.com/uclibs/ucrate/issues/673