Uploaded image for project: 'DSpace (LEGACY)'
  1. DSpace (LEGACY)
  2. DS-4361

CSV batch editing with fields named "*person*"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.0
    • Fix Version/s: 7.0
    • Component/s: DSpace API
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      0
    • Documentation Status:
      Needed

      Description

      /dspace/bin/dspace metadata-import -e paulo.graca@fccn.pt -f /tmp/adelino.canario-fcfda369-dbb3-4ce0-a3c6-3838443f83ad_person.csv

       

      When you try to import something like:

      id collection dc.contributor.author person.givenName person.familyName
      + 123456789/1 Doe, John John Doe

      you will get this error:

      Bad metadata declaration in column3: givenName

       

      the "person." has been replaced. And the field couldn't be identified. I think it's related with this:

      https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/app/bulkedit/DSpaceCSV.java#L181

       

       AuthorityValue authorityValueType = authorityValueService.getAuthorityValueType(element);
       if (authorityValueType != null) {
        String authorityType = authorityValueType.getAuthorityType();
        authorityPrefix = element.substring(0, authorityType.length() + 1);
        element = element.substring(authorityPrefix.length());
       }

       

      where the authorityValueType.getAuthorityType() is "person"

      https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/authority/PersonAuthorityValue.java#L200

       

      and then the field name will be replaced here: 

      authorityPrefix = element.substring(0, authorityType.length() + 1);

       

      leaving field names like "person.givenName" to be converted to "givenName".

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              paulo_graca Paulo Graça
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: