Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ This project bumps the version number for any changes (including documentation u
- none

## [Unreleased] - i.e. pushed to main branch but not yet tagged as a release

## [6.1.1] - 2025-04-22
- BUGFIX: deriving config from RecordMapper does not break when new-style "dataConfigType" property is included
- DataHandler(s) can accept a URL for a mapper (or DataConfig, for new data-toolkit), and fetch/parse the JSON for use
- BUGFIX: [#185](https://github.com/collectionspace/collectionspace-mapper/issues/185) - Error adding a field subgroup with no data to a field group

## [6.1.0] - 2024-11-18
- Add `authority_terms_duplicate_mode` batch config setting that changes the way authority `shortIdentifier` values are generated, allowing near-duplicate terms to be created in a batch.
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ GIT
PATH
remote: .
specs:
collectionspace-mapper (6.1.0)
collectionspace-mapper (6.1.1)
activesupport (= 6.0.4.7)
chronic
collectionspace-refcache
Expand Down
2 changes: 2 additions & 0 deletions lib/collectionspace/mapper/data_mapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ def assign_subgroup_values_to_group_hash_data(groups, field, subgroups)
end

def map_subgroup(xpath, thisdata)
return if thisdata.empty?

parent_path = xpath.parent
parent_set = doc.xpath("//#{parent_path}")
subgroup_path = xpath.path
Expand Down
2 changes: 1 addition & 1 deletion lib/collectionspace/mapper/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module CollectionSpace
module Mapper
VERSION = "6.1.0"
VERSION = "6.1.1"
end
end
9 changes: 9 additions & 0 deletions spec/collectionspace/mapper/data_mapper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,15 @@
expect(w).to be false
end
end

context "with subgroup having all empty values" do
let(:datahash_path) do
"spec/support/datahashes/core/collectionobject8.json"
end
let(:fixture_path) { "core/collectionobject8.xml" }

it_behaves_like "Mapped"
end
end

context "when media ", type: "integration" do
Expand Down
5 changes: 5 additions & 0 deletions spec/support/datahashes/core/collectionobject8.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"objectNumber": "36548",
"value": null,
"measurementUnit": null
}
6 changes: 6 additions & 0 deletions spec/support/xml/core/collectionobject8.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<document>
<ns2:collectionobjects_common xmlns:ns2="http://collectionspace.org/services/collectionobject" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<objectNumber>36548</objectNumber>
</ns2:collectionobjects_common>
</document>
Loading