Skip to content

Problem: when importing metadata, a3m METS includes empty fields in dmdSec #348

@sallain

Description

@sallain

Describe the bug
When using a CSV file to import metadata alongside a transfer, the CSV may contain empty fields. For example:

filename dc.title dc.subject dc.subject dc.subject
objects/birds.mp3 14000 Caen, France - Bird in my garden field recording phonography sound art
objects/beihai.tif Beihai, Guanxi, China, 1988 satellite imagery

The second item in this table only has one subject term, but because the first one has three subjects, the second has two blank fields.

When a3m imports this into the METS dmdSec, the empty fields are recorded as well:

          <dc:title>Beihai, Guanxi, China, 1988</dc:title>
          <dc:subject>satellite imagery</dc:subject>
          <dc:subject></dc:subject>
          <dc:subject></dc:subject>

In Archivematica, the empty fields are not included in the METS:

          <dc:title>Beihai, Guanxi, China, 1988</dc:title>
          <dc:subject>satellite imagery</dc:subject>

To Reproduce
Steps to reproduce the behavior:

  1. Start a transfer in Enduro using the DemoTransfersCSV package from archivematica-sampledata
  2. Review the dmdSec for beihai.tif (or another image; birds.mp3 has the most subjects, so any other item in the transfer will have blank subjects)

Expected behavior
Blank fields are not recorded in the METS.

Additional context
This comparison is to Archivematica 1.14. This change was introduced in Archivematica 1.14 through artefactual/archivematica#1813.

This issue was originally filed as artefactual-sdps/enduro#610 but I should've filed it here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions