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

allow publishing and OpenAire export when first name is missing for author #7059 #7098

Merged
merged 2 commits into from Jul 27, 2020

Conversation

pdurbin
Copy link
Member

@pdurbin pdurbin commented Jul 17, 2020

What this PR does / why we need it:

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.

Which issue(s) this PR closes:

Closes #7059

Special notes for your reviewer:

An ArrayIndexOutOfBoundsException was being thrown.

Suggestions on how to test this:

For me, it wasn't enough to type "Smith," as the author name. I had to turn on ORCID (no ORCID ID required) like this:

Screen Shot 2020-07-17 at 2 38 45 PM

(There's existing logic in the code that the presence of an ORCID indicates a person rather than an organization.)

The expected behavior:

  • You are able to publish the dataset.
  • A log entry like this: [2020-07-17T14:39:26.076-0400] [Payara 5.201] [INFO] [] [edu.harvard.iq.dataverse.export.openaire.OpenAireExportUtil] ... [[Unable to write givenName and familyName based on creatorName 'Smith, '.]]
  • As the log states, no givenName or familyName present in the OpenAire export.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

No.

Is there a release notes update needed for this change?:

No. Just a bug fix. An ArrayIndexOutOfBoundsException was being thrown and now there is an additional check on the size of the array before indexing into it.

Additional documentation:

None.

@coveralls
Copy link

coveralls commented Jul 17, 2020

Coverage Status

Coverage increased (+0.002%) to 19.612% when pulling f3f7a38 on 7059-openaire into 941d17d on develop.

@djbrooke djbrooke added this to the Dataverse 5 milestone Jul 21, 2020
@djbrooke djbrooke requested a review from fcadili July 21, 2020 13:08
@sekmiller sekmiller self-assigned this Jul 21, 2020
Copy link
Contributor

@sekmiller sekmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable and works in practice.

IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) automation moved this from Code Review 🦁 to QA 🔎✅ Jul 21, 2020
@sekmiller sekmiller removed their assignment Jul 21, 2020
@kcondon kcondon self-assigned this Jul 27, 2020
@kcondon kcondon merged commit a7da6c9 into develop Jul 27, 2020
IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) automation moved this from QA 🔎✅ to Done 🚀 Jul 27, 2020
@kcondon kcondon deleted the 7059-openaire branch July 27, 2020 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

OpenAire export failure when Author's first name is missing
5 participants