Releases: samvera/bulkrax
v2.2.2
What's Changed
Bug Fixes 🐞
- i350 - fix for multile ui elements on index page by @ShanaLMoore in #414
Full Changelog: v2.2.1...v2.2.2
v2.2.1
What's Changed
Bug Fixes 🐞
- call increment_counters before perform_now job by @ShanaLMoore in #411
Full Changelog: v2.2.0...v2.2.1
v2.2.0
What's Changed
Exciting New Features 🎉
- Add Collections and FileSets to CSV exports by @bkiahstroud in #408
Bug Fixes 🐞
- fixes export zip downloads inline #389 by @cziaarm in #390
- Fix test db cleaning, stop running ObjectFactory spec when it isn't supposed to be by @bkiahstroud in #409
New Contributors
Full Changelog: v2.1.1...v2.2.0
v2.1.1
What's Changed
Bug Fixes 🐞
- Collection title should be a string instead of an array by @ShanaLMoore in #406
Full Changelog: v2.1.0...v2.1.1
v2.1.0
What's Changed
Exciting New Features 🎉
- Add ability to import FileSet metadata using the CSV Importer by @bkiahstroud in #388
Database Changes
New migrations have been added. Please run rails db:migrate
after upgrading
Full Changelog: v2.0.2...v2.1.0
v2.0.2
What's Changed
- Fix bug where Collections imported using the
collection_field_mapping
were failing with amissing required fields - :source_identifier
error - Fix bug where entries with empty parent or child values were triggering the
CreateRelationshipsJob
, which would then throw an error - Fix bug where
CreateRelationshipsJob
s were being run when running an importer in "validate only" mode
Issue Fixes
Full Changelog: v2.0.1...v2.0.2
v.2.0.1
2.0.0
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) inconfig/initializers/bulkrax.rb
in order to import collections by title- See here for how to set
collection_field_mapping
- See here for how to set
-
parent_child_field_mapping
has been renamed torelated_children_field_mapping
and merged into thefield_mappings
hash inconfig/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
- Previous:
-
Deprecation's
Features that will be removed in Bulkrax version 3.0:
- Importing Collections by title using the
collection_field_mapping
- Please use the new parent-child field mappings to import Collections
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
1.0.0 - A Time for Releases
As more community members begin to use Bulkrax in earnest, it is time for the rapid and often breaking changes to Bulkrax to come to a close. This will be the first of regular releases going forward.
Recent Breaking Changes:
-
Source Identifiers and Work Identifiers (previously system identifier)
There has been a lot of confusion in the code between these two items. Some of that confusion stemed from the names being to similar, but the majority of it came from the idea of specifying them separately. Instead of two seperate variables, we now specify which field is the source_identifier in the field hash. This simplifies the specification and makes it more flexible to overriding.# Was config.system_identifier_field = 'source' config.source_identifier_field_mapping = { 'Bulkrax::CsvEntry' => 'MyIdentifierField' } # Now config.field_mappings["Bulkrax::CsvParser"]["source"] = { from: ["MyIdentifierField"], source_identifier: true }
-
Fill in missing identifier functionality
# Should Bulkrax make up source identifiers for you? This allows round tripping and downloaded errored entries to still work, but does # mean if you upload the same source record in two different files you WILL get duplicates. # for the importer id and the row in the file # config.fill_in_blank_source_identifiers.call = -> { "b-#{importer.id}-#{_index}"} # or use a uuid # config.fill_in_blank_source_identifiers.call = -> { SecureRandom.uuid }
-
Refactored ObjectFactory initializer to use named arguments
ObjectFactory.new(attrs, source_identifier, work_id, false, user) # Now ObjectFactory.new(attributes: attrs, source_identifier_value: source_identifier, work_identifier: work_id, user: user, replace_files: false)
New Features
- Parsers handle numerated notation
1_value # or value_1
- Parsers handle fields that are prefixed or not prefixed with the object name
"creator_first_name" => { from: ["creator_first_name"], object: "creator" } # or "first_name" => { from: ["creator_first_name"], object: "creator" }
- Parsers handle values nested in an object
# ['Queen'] is the nested value within the "creator" object below [{ creator: { position: ['Queen'] } }]
- Updating an importer has a new option. Instead of only a destructive update, whereby all FileSets are destroyed and then re-created, there is now a nondestructive option that uses fedora/hyrax's versioning tools to create a version of the FileSet then update it.
- We have also made great strides in setting up the ability to round-trip. Now when a new importer is created, if any of the works imported already exist in the system, it will match and update the work rather than duplicating it. This matching is based on the source identifiers and work identifiers (mentioned above).
Bug Fixes
Many bug fixes around exports, field sizes and the way file updates are handled.