Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow based_near_attributes to create Hyrax::ControlledVocabulary::Location entries on import #845

Open
jwhitney opened this issue Jul 31, 2023 · 0 comments

Comments

@jwhitney
Copy link

We’d like to import values into the Location field / based_near attribute for our work types. We're working with Hyrax v3.5.0, Bulkrax v5.1.0.

We’ve added local processing to look for Geonames URIs in import data and add a based_near_attributes hash to parsed_metadata, in the form that’s expected when works are created/updated through the UI, to create Hyrax::ControlledVocabulary::Location entries for the work's based_near attribute.

https://github.com/cu-library/cuirator/blob/main/app/models/concerns/bulkrax/has_local_processing.rb

But Bulkrax::ObjectFactory only permits attributes that align with work type properties, and removes the based_near_attributes property & associated hash

https://github.com/samvera-labs/bulkrax/blob/817e4bb826260c2b402f730e7696dd90027f0c0c/app/factories/bulkrax/object_factory.rb#L263

I think this is a bug -- although we’ve added local processing to add a controlled vocabulary value on import, Bulkrax should allow attributes that are used when creating / updating works with Location information through the UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant