Skip to content

IQSS/11174-ROR url not added in author affiliation#11175

Merged
ofahimIQSS merged 1 commit intoIQSS:developfrom
QualitativeDataRepository:IQSS/11174-Fix_authorAffiliation_DataCite_XML
Jan 22, 2025
Merged

IQSS/11174-ROR url not added in author affiliation#11175
ofahimIQSS merged 1 commit intoIQSS:developfrom
QualitativeDataRepository:IQSS/11174-Fix_authorAffiliation_DataCite_XML

Conversation

@qqmyers
Copy link
Member

@qqmyers qqmyers commented Jan 21, 2025

What this PR does / why we need it: Fixes a bug in the DataCite metadata/export.

Which issue(s) this PR closes:

Special notes for your reviewer:

Suggestions on how to test this:
Configure the ROR script for the author affiliation field (e.g. as on demo). Use a ROR URL for the author affiliation, publish, and verify that the DataCite xml exported has the ROR URL in the affiliationID attribute as in the example in the issue. (To test a dataset published with the prior code, you can just run the reexportDataset API call to see the DataCite xml get updated.

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

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

Additional documentation:

@qqmyers qqmyers added the Size: 3 A percentage of a sprint. 2.1 hours. label Jan 21, 2025
@coveralls
Copy link

Coverage Status

coverage: 22.751%. remained the same
when pulling 782188f on QualitativeDataRepository:IQSS/11174-Fix_authorAffiliation_DataCite_XML
into 69ebed2 on IQSS:develop.

@pdurbin pdurbin changed the base branch from develop to 11075-ror January 21, 2025 16:25
@pdurbin pdurbin changed the base branch from 11075-ror to develop January 21, 2025 16:52
Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

At standup today I said I thought this PR would affect the tests I'm writing for but it seems not to be the case. It has no effect.

I'm creating an author like this:

.add(Json.createObjectBuilder()
        .add("authorName",
                Json.createObjectBuilder()
                        .add("value", "Simpson, Homer")
                        .add("typeClass", "primitive")
                        .add("multiple", false)
                        .add("typeName", "authorName")
        )
        .add("authorAffiliation",
                Json.createObjectBuilder()
                        .add("value", "https://ror.org/03vek6s52")
                        .add("typeClass", "primitive")
                        .add("multiple", false)
                        .add("typeName", "authorAffiliation")
        )
)

With or without this PR, I'm getting this as output from the "Datacite" exporter:

<affiliation affiliationIdentifier="https://ror.org/03vek6s52" schemeURI="https://ror.org" affiliationIdentifierScheme="ROR">https://ror.org/03vek6s52</affiliation>

I guess I'll go ahead and approve it.

I suspect it might need to be tested with a working :CVocConf config, which I'm not testing with.

@pdurbin pdurbin removed their assignment Jan 21, 2025
@qqmyers
Copy link
Member Author

qqmyers commented Jan 21, 2025

Yep - good catch - the ROR URL is only converted to the org name if the ROR script has been configured so that the name has been cached.

@ofahimIQSS ofahimIQSS self-assigned this Jan 22, 2025
@ofahimIQSS
Copy link
Contributor

When I deploy this to internal - internal goes down and displays the payara page.
image

@qqmyers
Copy link
Member Author

qqmyers commented Jan 22, 2025

Internal has a problem with the Flyway 6.5.0.2 script having been changed (presumably different branches got deployed there). Not related to this PR per se.

@pdurbin
Copy link
Member

pdurbin commented Jan 22, 2025

I suspect it might need to be tested with a working :CVocConf config, which I'm not testing with.

For the record, I did testing with a working :CVocConf config. I left a TODO in the other PR:

                    // Once https://github.com/IQSS/dataverse/pull/11175 is merged the equalTo below
                    // should be "https://ror.org/03vek6s52" instead of "Harvard University".
                    .body("resource.creators.creator[0].affiliation.@affiliationIdentifier", equalTo("Harvard University"));

@ofahimIQSS
Copy link
Contributor

No issues found during testing of the PR.

The format here is incorrect as ror.org is appearing twice, but that should get addressed by #11118
schemeURI="https://ror.org">https://ror.org/https://ror.org/044hpwe09

image

@ofahimIQSS ofahimIQSS merged commit fb36def into IQSS:develop Jan 22, 2025
11 checks passed
@ofahimIQSS ofahimIQSS removed their assignment Jan 22, 2025
@qqmyers
Copy link
Member Author

qqmyers commented Jan 22, 2025

FWIW: This PR is about the author affiliation field when a ROR is used there and when a ROR external vocab script is enabled for it. Use of a ROR for the author name (as shown in the image above) is not affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Size: 3 A percentage of a sprint. 2.1 hours.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DataCite export doesn't correctly write ROR for author affiliation

4 participants