Uploaded image for project: 'Islandora'
  1. Islandora
  2. ISLANDORA-2067

Loss of potential RELS-INT statements when the RELS-INT does not exist

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.x-1.10
    • Component/s: Tuque API, XACML Editor
    • Labels:
      None

      Description

      When Tuque attempts to modify the RELS-INT datastream it's possible have the following case:

      RELS-INT statement a contains a literal "A"
      RELS-INT statement b contains a literal "B".

      The expected outcome is for the RELS-INT to contain two separate entries with both literals "A" and "B" present.

      When the RELS-INT datastream does not exist (is not initialized) the outcome is only the "A" literal being present. This behavior was previously masked before https://github.com/Islandora/tuque/pull/157/files but now will throw a DatastreamExistsException if this behavior is encountered. The fix will be identical to the one present already in the "get" method of the FedoraRelsInt class: https://github.com/Islandora/tuque/blob/1.x/FedoraRelationships.php#L852-L859.

      An example in code of where this can potentially happen is in the XACML module: https://github.com/Islandora/islandora_xacml_editor/blob/7.x/api/includes/islandora_xacml.inc#L87-L90.

      An identify script for potential problems in XACML will be forthcoming as well as a unit test/fix for Tuque.

      Test case:

      Ingest a collection object.
      Set the COLLECTION_POLICY to be one that has takes a binary file as the OBJ.
      Set the XACML POLICY to have datastream restrictions of both DC and OBJ.
      Navigate to the collection object and attempt to ingest a child object.
      Note that "A problem occurred while ingesting" exception message appears and in the watchdogs the exception "Exception during ingest with Message: "The datastream RELS-INT already exists on the object" is logged.

      Fix rectifies this behavior and the RELS-INT contains both entries for the OBJ and DC.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jordandukart Jordan Dukart
                Reporter:
                jordandukart Jordan Dukart
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: