Skip to content

Commit

Permalink
Merge pull request #10772 from Recherche-Data-Gouv/fix_importDDI_otherId
Browse files Browse the repository at this point in the history
Harvesting : Fix DDI Import for otherId
  • Loading branch information
ofahimIQSS authored Nov 5, 2024
2 parents 6a00ce5 + 483e99f commit e3b3fea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions doc/release-notes/10772-fix-importDDI-otherId.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Bug Fix :
This PR fixes the `edu.harvard.iq.dataverse.util.json.JsonParseException: incorrect multiple for field otherId` error when DDI harvested data contains multiple ortherId.
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ private void processDDI(ImportType importType, XMLStreamReader xmlr, DatasetDTO
// study description section. we'll use the one we found in
// the codeBook entry:
FieldDTO otherIdValue = FieldDTO.createPrimitiveFieldDTO("otherIdValue", codeBookLevelId);
FieldDTO otherId = FieldDTO.createCompoundFieldDTO("otherId", otherIdValue);
FieldDTO otherId = FieldDTO.createMultipleCompoundFieldDTO("otherId", otherIdValue);
citationBlock.getFields().add(otherId);

}
Expand Down

0 comments on commit e3b3fea

Please sign in to comment.