Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: Custom structMaps are labelled structmap_2 regardless of how many existing structmaps are in an AIP METS #633

Closed
ross-spencer opened this issue Apr 8, 2019 · 2 comments
Assignees
Labels
IISH International Institute of Social History
Milestone

Comments

@ross-spencer
Copy link
Contributor

ross-spencer commented Apr 8, 2019

Expected behaviour

When a custom structMap is added to Archivematica it follows a logical sequence.

Current behaviour

If two structMaps exist at the time the new custom structMap is written, the new sturctMap will still be labelled structMap_2:

  <mets:structMap ID="structMap_1" LABEL="Archivematica default" TYPE="physical">
    <mets:div LABEL="structmap_example-7d047171-79de-41f0-afb7-5d42a46784b2" TYPE="Directory" DMDID="dmdSec_1">
      <mets:div LABEL="objects" TYPE="Directory">
        <mets:div LABEL="README.md" TYPE="Item">
          <mets:fptr FILEID="file-cf6288ab-52e8-4d9c-a284-bb30077a59a2"/>
        </mets:div>
        <mets:div LABEL="ferdinand_short_2017_01_27-3ba9f687-79e7-4820-b521-031ffa06ac33.wav" TYPE="Item">
          <mets:fptr FILEID="file-3ba9f687-79e7-4820-b521-031ffa06ac33"/>
        </mets:div>
        <mets:div LABEL="ferdinand_short_2017_01_27.mp3" TYPE="Item">
          <mets:fptr FILEID="file-7d71f401-5bde-46d7-a017-89a108e2b674"/>
        </mets:div>
        <mets:div LABEL="metadata" TYPE="Directory">
          <mets:div LABEL="transfers" TYPE="Directory">
            <mets:div LABEL="structmap_example-50ea1ee4-4a8b-4be2-a8d7-8641f57904e0" TYPE="Directory">
              <mets:div LABEL="directory_tree.txt" TYPE="Item">
                <mets:fptr FILEID="file-a027baed-5396-4ab2-9d5d-2c65ee6a007a"/>
              </mets:div>
              <mets:div LABEL="mets_structmap.xml" TYPE="Item">
                <mets:fptr FILEID="file-3bce0cc3-0ca3-44fc-bfa3-cd7980b9635f"/>
              </mets:div>
            </mets:div>
          </mets:div>
        </mets:div>
        <mets:div LABEL="submissionDocumentation" TYPE="Directory">
          <mets:div LABEL="transfer-structmap_example-50ea1ee4-4a8b-4be2-a8d7-8641f57904e0" TYPE="Directory">
            <mets:div LABEL="METS.xml" TYPE="Item">
              <mets:fptr FILEID="file-e260b5db-9572-40cf-9b93-88911d73b809"/>
            </mets:div>
          </mets:div>
        </mets:div>
      </mets:div>
    </mets:div>
  </mets:structMap>
  <mets:structMap ID="structMap_2" LABEL="Normative Directory Structure" TYPE="logical">
    <mets:div LABEL="structmap_example-7d047171-79de-41f0-afb7-5d42a46784b2" TYPE="Directory">
      <mets:div LABEL="objects" TYPE="Directory">
        <mets:div LABEL="ferdinand_short_2017_01_27-3ba9f687-79e7-4820-b521-031ffa06ac33.wav" TYPE="Item"/>
        <mets:div LABEL="README.md" TYPE="Item"/>
        <mets:div LABEL="ferdinand_short_2017_01_27.mp3" TYPE="Item"/>
        <mets:div LABEL="submissionDocumentation" TYPE="Directory">
          <mets:div LABEL="transfer-structmap_example-50ea1ee4-4a8b-4be2-a8d7-8641f57904e0" TYPE="Directory">
            <mets:div LABEL="METS.xml" TYPE="Item"/>
          </mets:div>
        </mets:div>
        <mets:div LABEL="metadata" TYPE="Directory">
          <mets:div LABEL="transfers" TYPE="Directory">
            <mets:div LABEL="structmap_example-50ea1ee4-4a8b-4be2-a8d7-8641f57904e0" TYPE="Directory">
              <mets:div LABEL="directory_tree.txt" TYPE="Item"/>
              <mets:div LABEL="mets_structmap.xml" TYPE="Item"/>
            </mets:div>
          </mets:div>
        </mets:div>
      </mets:div>
    </mets:div>
  </mets:structMap>
  <mets:structMap TYPE="logical" ID="structMap_2">
    <mets:div TYPE="Short Listen: Ferdinand, the Misunderstood Bull by With Good Reason" LABEL="documentary">
      <mets:div TYPE="track" LABEL="Complete documentary">
        <!-- File: ferdinand_short_2017_01_27.mp3

          NB. The filename is designed to fit the original design of the
          custom structMap functionality and so it is kept as simple as
          possible and will validate as a xs:IDREF'.
        -->
        <mets:fptr FILEID="file-7d71f401-5bde-46d7-a017-89a108e2b674"/>
      </mets:div>
    </mets:div>
  </mets:structMap>

Steps to reproduce

Run the sample transfer here with document empty directories on and observe the results on the AIP has been created.

NB. Line where this is happening in create_mets_v2.py: https://github.com/artefactual/archivematica/blob/84661775836cf8037ad3b48feb8e02bb80335f0f/src/MCPClient/lib/clientScripts/create_mets_v2.py#L684-L685

Your environment (version of Archivematica, OS version, etc)

Archivematica qa/1.x post release of stable/1.9.1.


For Artefactual use:
Please make sure these steps are taken before moving this issue from Review to Verified in Waffle:

  • All PRs related to this issue are properly linked 👍
  • All PRs related to this issue have been merged 👍
  • Test plan for this issue has been implemented and passed 👍
  • Documentation regarding this issue has been written and it has been added to the release notes, if needed 👍
@ross-spencer
Copy link
Contributor Author

Related to: #283

@ross-spencer
Copy link
Contributor Author

Hi @sromkey I added the 1.10 milestone as this will be resolved by #633

@ross-spencer ross-spencer added IISH International Institute of Social History Status: review The issue's code has been merged and is ready for testing/review. and removed Status: in progress Issue that is currently being worked on. labels Apr 17, 2019
@sallain sallain assigned evelynPM and unassigned ross-spencer Jul 8, 2019
@evelynPM evelynPM removed the Status: review The issue's code has been merged and is ready for testing/review. label Jul 8, 2019
@evelynPM evelynPM closed this as completed Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IISH International Institute of Social History
Projects
None yet
Development

No branches or pull requests

2 participants