archivematica / Issues

Issues repository for the Archivematica project
GNU Affero General Public License v3.0
16 stars 1 forks source link

Problem: Partial reingest fails if the METS contains non-core DC properties at the AIP level #1620

Closed replaceafill closed 6 months ago

replaceafill commented 1 year ago

Expected behaviour

Partial reingest works independently of the METS contents.

Current behaviour

If the METS file contains AIP level DC metadata (i.e. associated to the objects directory of the structMap element) with non-core properties (not part of the Dublin Core Metadata Element Set) that are not contained in the following list:

the Reingest AIP -> Populate database with reingested AIP data job will fail with an error like this (provenance was the custom property in this output):

'provenance'Traceback (most recent call last):
  File "/opt/archivematica/archivematica/src/MCPClient/lib/job.py", line 113, in JobContext
    yield
  File "/opt/archivematica/archivematica/src/MCPClient/lib/clientScripts/parse_mets_to_db.py", line 566, in call
    job.set_status(main(job, args.sip_uuid, args.sip_path))
  File "/opt/archivematica/archivematica/src/MCPClient/lib/clientScripts/parse_mets_to_db.py", line 550, in main
    parse_dc(job, sip_uuid, root)
  File "/opt/archivematica/archivematica/src/MCPClient/lib/clientScripts/parse_mets_to_db.py", line 249, in parse_dc
    setattr(dc_model, DC_TERMS_MATCHING[tag], elem.text)
KeyError: 'provenance'

Steps to reproduce

  1. Create a transfer with a metadata.csv file containing non-core DC columns, e.g. dc.provenance
  2. Assign a value for the dc.provenance column to the objects directory
  3. Process the transfer to get an AIP and then run a partial reingest on it
  4. The Reingest AIP -> Populate database with reingested AIP data job will fail

Your environment (version of Archivematica, operating system, other relevant details)

https://github.com/artefactual/archivematica/commit/279c190b6d44880d1da9f1d26a3bf34e5cf6c60d but also reproduced in the Archivematica Sandbox which is using 1.13.2 at the moment.


For Artefactual use:

Before you close this issue, you must check off the following:

sromkey commented 6 months ago

We tested this by changing the dc.rights column in the sample csv to dc. provenance and it re-ingested no problem.