uvalib / tracksys

UVA Library Digitization Services workflow and repository management tool.
8 stars 2 forks source link

bibl.save! exception after assigning bibl.parent_bibl_id for DPLA #188

Closed sdm7g closed 6 years ago

sdm7g commented 9 years ago

Trying to follow Andrew's instructions: https://confluence.lib.virginia.edu/display/DCMD/DPLA+Notes yields an exception and a transaction rollback on the save!. It looks like ActiveRecord callbacks are causing a problem -- it can't find class 'ParentBibl' . I've added a conditional in this commit: https://github.com/uvalib-dcs/tracksys/commit/c98e1a75527c650578c8302f9fc37df37fff8ba4 I'm not sure if this is the right way to handle it. Need to read and understand http://guides.rubyonrails.org/active_record_callbacks.html a little better.

Also need to figure out how to put these issues into Jira, but sticking it here for now.

sdm7g commented 9 years ago

Added dpla to show & edit https://github.com/uvalib-dcs/tracksys/commit/c5487f99555d21ab6d14b960bdad3d2b07f7ff64

parent_bibl to edit field (if dpla) https://github.com/uvalib-dcs/tracksys/commit/f1abcb7e021f58782a0caaea7d6ed0f5cbdc3134 ( This one is not as smart as I intended: you have to save with dpla=true and edit again so that this option shows up. Would need to show/hide with javascript to make it dynamic. )

and link to child bibls from parent https://github.com/uvalib-dcs/tracksys/commit/e16413feecfb4bc15a94ae1e206164e9850b6e4c

Added 'scope dpla' https://github.com/uvalib-dcs/tracksys/commit/9212b5f9299856dbc660663732b7420effcc6ad8

louffoster commented 6 years ago

This was all re-written and no longer causes a problem