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

pkp/pkp-lib#7135 Multiple author affiliations #1

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

@GaziYucel
Copy link
Contributor Author

Hi @asmecher. Can you please review this PR.

@@ -106,7 +107,9 @@ function editSubmissionFile(string $hookName, array $args) : bool
$author->setData('email', '');
$author->setData('givenName', $xpath->query('tei:persName/tei:forename[@type="first"]', $authorNode)->item(0)->nodeValue, $primaryLocale);
$author->setData('familyName', $xpath->query('tei:persName/tei:surname', $authorNode)->item(0)->nodeValue, $primaryLocale);
$author->setData('affiliation', $xpath->query('tei:affiliation/tei:orgName', $authorNode)->item(0)->nodeValue, $primaryLocale);
$affiliation = new Affiliation();
$affiliation->setName($xpath->query('tei:affiliation/tei:orgName', $authorNode)->item(0)->nodeValue, $primaryLocale);
Copy link

Choose a reason for hiding this comment

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

Do we like to look for RORs here? Similar to here: https://github.com/bozana/pkp-lib/blob/7135/plugins/importexport/native/filter/NativeXmlPKPAuthorFilter.php#L117-L129.
I.e. something like:
$name = $xpath->query('tei:affiliation/tei:orgName', $authorNode)->item(0)->nodeValue;
$affiliation->setName($name, $primaryLocale);
$ror = Repo::ror()->getCollector()->filterByName($name)->getMany()->first();
if ($ror) {
$affiliation->setRor($ror->getRor());
$affiliation->setName(null);
}

Copy link
Owner

Choose a reason for hiding this comment

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

No objections -- but this is just an experimental plugin at the moment, so consider it generally subject to review/improvement.

Copy link
Owner

@asmecher asmecher left a comment

Choose a reason for hiding this comment

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

Thanks, @GaziYucel, this is fine with me -- but feel free to address @bozana's comment, or not. Up to you.

@GaziYucel GaziYucel force-pushed the multiple-author-affiliations branch from 8065a61 to 7911432 Compare February 6, 2025 08:15
@GaziYucel
Copy link
Contributor Author

I have pushed a new version, including Bozana's recommendation. Thanks both.

@bozana
Copy link

bozana commented Feb 6, 2025

only this PR left to be merged...

@asmecher asmecher merged commit 76e7281 into asmecher:main Feb 6, 2025
@asmecher
Copy link
Owner

asmecher commented Feb 6, 2025

Merged -- thanks, @GaziYucel and @bozana!

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 this pull request may close these issues.

3 participants