-
Notifications
You must be signed in to change notification settings - Fork 22
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
Removing Multi-Value Metadata Values via CSV Import #904
Comments
@kposey1 there has been quite a bit of tug-o-war over blanks in Bulkrax. The behavior you describe (if the header is present and the value is empty, the meta data field should be cleared) is the correct behavior. So this sounds very much like a bug. the problem basically comes down to many cooks trying to solve a variety of problems around blanks in the various ways they can present. There are a few paths forward in the meantime in my mind:
|
Thank you @orangewolf for the direction! ~~If you don't mind elaborating, what is the recommended way to access the raw data from has_local_processing? ~~ After further investigation, it seems we had added a customization that cleared out nil values early in the processing. Removing this corrects the issue. |
@kposey1 sorry for vanishing on you, got crazy behind for a bit. The module "has_local_processing" is included in the Bulkrax::Entry class and then then the method in def add_local
# this would need to be your field names and whatever the right logic to detect blankness is
# this sudocode is off the top of my head and though the method name and method for changing parsed_metadata
# are correct, I have no idea if the rest of it is
parsed_metadata['my_multi_field'] = nil if parsed_metadata['my_multi_field']&.all?(&:blank?)
end |
According to the documentation, a user should be able to delete metadata values by importing a csv with a specified column header with no value.
However, our user is unable to do this with multi-value fields.
This is the configuration for the metadata field in
bulkrax.rb
:'sub_collection' => { from: ['sub_collection'], join: true, split: true }
The specified optional customization in
Bulkrax::ObjectFactory
(transformation_removes_blank_hash_values
) did not enable this either.I do see this line on the documentation, so I assume the csv import should delete all the values for the multi-value metadata field.
Is it possible to delete the value of multi-valued metadata fields via csv import? Are there additional configuration options that enable this feature?
Please note we are using version 5.3.0 of Bulkrax and 3.6.0 of Hyrax.
The text was updated successfully, but these errors were encountered: