DAMS purpose is to provide access to digitized and born-digital UCSC Special Collections content. This repository is used for project planning. It holds the task tickets and roadmap for the different projects under DAMS.
2
stars
0
forks
source link
Fix ActiveTriples::UndefinedPropertyError for Collection properties #511
ScoobySnacks::WorkModelBehavior calls #accepts_nested_attributes_for, which finalizes the metadata schema, which causes two issues:
All properties added after include ScoobySnacks::WorkModelBehavior will throw UndefinedPropertyErrors
Hyrax::BasicMetadataalso calls #accepts_nested_attributes_for, leading to a conflict
Instead of fixing the bug in ScoobySnacks, I opted to fix it in this repo since we'll need to bring the change over anyways once the ScoobySnacks gem is removed from the project
Testing Instructions
Login as an admin
Navigate to Dashboard > Importers > New
Fill out required fields and upload a CSV that contains a Collection with a harmfulLanguageStatement
Click "Create and Import"
Navigate to the importer's show page. After a couple minutes, refresh the page
Find the Collection entry and verify that no ActiveTriples::UndefinedPropertyError was thrown
Navigate to the Collection's edit page (e.g. Importer > Collection Entry > Collection Link > Edit button)
No error should be thrown
Edit the metadata and click Save
No error should be thrown
Acceptance Criteria
[x] No ActiveTriples::UndefinedPropertyErrors are thrown when importing Collections
[x] No errors are thrown when attempting to edit a Collection in the UI
Summary
ScoobySnacks::WorkModelBehavior calls
#accepts_nested_attributes_for
, which finalizes the metadata schema, which causes two issues:include ScoobySnacks::WorkModelBehavior
will throwUndefinedPropertyError
sHyrax::BasicMetadata
also calls#accepts_nested_attributes_for
, leading to a conflictInstead of fixing the bug in ScoobySnacks, I opted to fix it in this repo since we'll need to bring the change over anyways once the ScoobySnacks gem is removed from the project
Testing Instructions
harmfulLanguageStatement
ActiveTriples::UndefinedPropertyError
was thrownAcceptance Criteria
ActiveTriples::UndefinedPropertyError
s are thrown when importing Collections