Skip to content

2.0.0

Compare
Choose a tag to compare
@sephirothkod sephirothkod released this 14 Jan 05:37
· 438 commits to main since this release
f76b0bf

Bulkrax Release Notes

Features

Metadata

  • Ability to import and export single-valued properties that are children of other properties, by adding an “object” key to the field mapping (Wiki)
  • Ability to import and export multi-valued properties that are children of other properties, by adding “object” and “nested” keys to the field mapping (Wiki)
  • Single and multi-valued properties that are children of other properties are represented with numerated headers on the exported CSV (Wiki)
  • The Metadata-Only update now can be run without having to re-upload the files associated with it.
  • On import, a blank cell value will remove the existing value for that header, instead of skipping over the property
    • Both metadata and files can be removed this way

Relationships

  • Full documentation in Wiki
  • Adds the ability to import relationships from child records
  • Supports numerated headers for parent-child relationship imports
  • Adds #related_parents_parsed_mapping and #related_parents_parsed_mapping to new #supported_bulkrax_fields method so they can be processed by #add_metadata
  • Respects the presence of index in #set_parsed_data for non-object data

Collections

  • When exporting works as CSV, collection ids were not being exported. Collection ids are now included in export by default
  • Importing collections with metadata was not supported previously. Only importing collections by title was supported. Collections with metadata can now be imported like so:
source_identifier model title description
collection_1 Collection First Collection This will be the collection's description

Other notable feature updates

  • “Update Importer” is the only editable option on an importer edit page instead of the row of buttons. Clicking that button opens a modal that shows the actual updatable options along with descriptions
  • Ability to export a CSV from an individual exporter show page
  • The total works count is fixed on the index and show pages
  • Exported CSV titles reference whether the export was from a work type, collection or importer
    • Exporting from a work type uses the model name
    • Exporting from a collection uses the collection id
    • Exporting from an importer uses the importer id

Upgrade Path:

  • collection_field_mapping is now required to be set (per entry class) in config/initializers/bulkrax.rb in order to import collections by title

    • See here for how to set collection_field_mapping
  • parent_child_field_mapping has been renamed to related_children_field_mapping and merged into the field_mappings hash in config/initializers/bulkrax.rb

    • For full documentation and examples, see the Wiki

    • Example:

      • Previous:
        Bulkrax.setup do | config |
          config.parent_child_field_mapping = {
            'Bulkrax::CsvEntry' => 'children'
          }
        end
      • New equivalent:
        Bulkrax.setup do |config|
          config.field_mappings = {
            'Bulkrax::CsvEntry' = {
          	  'children' => { from: ['children'], related_children_field_mapping: true }
            }
          }
        end

Deprecation's

Features that will be removed in Bulkrax version 3.0:

Bug and error fixes:

  • Attaching collections to works was throwing an exception. member_of_collection_attributes was getting integers as keys, which is no longer supported. Convert these keys to a string instead.
  • Make sure remote files get file_name set, or Hyrax after 2.5 will fail
  • Fixes export error when there are colons in the values in the identifier
  • Avoid "data too long for column" SQL errors
  • Removing a column with a foreign key constraint fails in some versions of Mysql. Make removing the key constraint and index explicit to work around this limitation.
  • Fixes TypeError when parsing metadata