Skip to content

metadata-import fails on person entities if CSV contains ROR-ID values #464

@chgoe

Description

@chgoe

Describe the bug
This error occurs on version 2023.02.03: the script metadata-import fails for person entities if a ROR-ID value is provided.

To Reproduce
In our case this applies to the following attributes, that we set values for through the UI ("Edit all the details"):

  • oairecerif.person.affiliation

  • person.affiliation.name

Exporting such a person using metadata-export will result in a CSV that contains values structured like this:
Chemnitz University of Technology::will be referenced::ROR-ID::https://ror.org/00a208s56::600

When importing this CSV file (e.g. one generated through metadata-export, without any manual modifications) using metadata-import, the script will fail with the following error:

2024-07-26 13:32:53.648 ERROR metadata-import - 54 @ java.lang.NumberFormatException: For input string: "ROR-ID"
	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.base/java.lang.Integer.parseInt(Integer.java:652)
	at java.base/java.lang.Integer.valueOf(Integer.java:983)
	at org.dspace.app.bulkedit.MetadataImport.compareAndUpdate(MetadataImport.java:743)
	at org.dspace.app.bulkedit.MetadataImport.runImport(MetadataImport.java:410)
	at org.dspace.app.bulkedit.MetadataImport.internalRun(MetadataImport.java:213)
	at org.dspace.scripts.DSpaceRunnable.run(DSpaceRunnable.java:154)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions