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

OpenAire export failure when Author's first name is missing #7059

Closed
landreev opened this issue Jul 7, 2020 · 1 comment · Fixed by #7098
Closed

OpenAire export failure when Author's first name is missing #7059

landreev opened this issue Jul 7, 2020 · 1 comment · Fixed by #7098
Milestone

Comments

@landreev
Copy link
Contributor

landreev commented Jul 7, 2020

TL;DR: If the author is entered with an empty comma-separated first name, like this: "Smith," it results in a fatal error in the OpenAire export, making it impossible to publish the dataset.

This came up as part of a real-life support issue. May not be the most urgent of problems... But it causes a disproportionate amount of trouble and confusion for the user, vs. how simple it would be to fix. So maybe add this to d5 on account of that?

Looking at the exception stack trace and the corresponding code, it looks like adding some null/empty check there would fix this. (but maybe validation logic should also be added, to prevent the user from entering a name formatted like that?)

The exception stack trace:

Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
	at edu.harvard.iq.dataverse.export.openaire.OpenAireExportUtil.writeCreatorsElement(OpenAireExportUtil.java:279)
	at edu.harvard.iq.dataverse.export.openaire.OpenAireExportUtil.createOpenAire(OpenAireExportUtil.java:88)
	at edu.harvard.iq.dataverse.export.openaire.OpenAireExportUtil.dto2openaire(OpenAireExportUtil.java:60)
	at edu.harvard.iq.dataverse.export.openaire.OpenAireExportUtil.datasetJson2openaire(OpenAireExportUtil.java:48)
	at edu.harvard.iq.dataverse.export.OpenAireExporter.exportDataset(OpenAireExporter.java:35)
	at edu.harvard.iq.dataverse.export.ExportService.cacheExport(ExportService.java:268)
	at edu.harvard.iq.dataverse.export.ExportService.exportAllFormats(ExportService.java:168)
	at edu.harvard.iq.dataverse.engine.command.impl.FinalizeDatasetPublicationCommand.exportMetadata(FinalizeDatasetPublicationCommand.java:198)
	at edu.harvard.iq.dataverse.engine.command.impl.FinalizeDatasetPublicationCommand.onSuccess(FinalizeDatasetPublicationCommand.java:185)

An example from prod.:
Screen Shot 2020-06-24 at 11 48 54 AM

@landreev
Copy link
Contributor Author

landreev commented Jul 7, 2020

There's an open issue #6492, where splitting the author name into separate "first name" and "last name" fields was being debated. OpenAire is specifically mentioned there. Having two separate fields would make the problem described above moot. However, I'm NOT suggesting touching that can of warms at all (it is complicated, as discussed there), but rather to just fix the problem at hand.

@djbrooke djbrooke added this to the Dataverse 5 milestone Jul 15, 2020
@djbrooke djbrooke added the Small label Jul 15, 2020
@pdurbin pdurbin self-assigned this Jul 17, 2020
@pdurbin pdurbin moved this from Up Next 🛎 to IQSS Team - In Progress 💻 in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) Jul 17, 2020
@pdurbin pdurbin removed their assignment Jul 17, 2020
kcondon added a commit that referenced this issue Jul 27, 2020
allow publishing and OpenAire export when first name is missing for author #7059
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants