Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-4493

ItemImport initialises language code with empty string when absent instead of null

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Code Review Needed (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 6.3, 5.10
    • Fix Version/s: 5.11, 6.4, 7.0
    • Component/s: None
    • Attachments:
      1
    • Comments:
      3
    • Documentation Status:
      Needed

      Description

      Expected behaviour when importing a field that doesn't have a language code is that the language should stay null.

      I have observed that it gets initialised a an empty string, instead of null. When exporting metadata to CSV, this manifests as empty square brackets in the column headers, which causes a slate of issues, when used for editing items in batch.

      To reproduce / see effects 

      Use the zip file import to import the simple SAF I have attached here (one item). In the XML, you will see that there is no trace of language codes at all. So the metadata should have no language codes in DSpace neither. But the languages DO get initialised as an empty string.

      If you do a CSV export of the metadata, for the collection the item is in, you will see the metadata for this item appear under column headers that have the trailing empty square brackets "[]", which is the indication of the empty string value for language in the DB.

      Thanks to

      Alexander Efimov / Ефимов Александр Александрович for reporting this to me & showing me how to reproduce it.

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            bram Bram Luyten (Atmire)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated: