-
Notifications
You must be signed in to change notification settings - Fork 448
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
Multiple author affiliations #10460
base: main
Are you sure you want to change the base?
Multiple author affiliations #10460
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @GaziYucel, thanks a lot for the good work and improvements!
I left a few comments.
I believe, that having the ROR object in an affiliation would make it easier to deal with names in different locales, e.g. we will not need to worry about setting ROR default name to the affiliation name with the submission locale, and also getting getLocalizedAffiliations... should be easier. I am only not sure how that would work with the ui-library... Let me know what do you think...
@@ -182,7 +182,7 @@ public function initData() | |||
$data = [ | |||
'givenName' => $author->getGivenName(null), // Localized | |||
'familyName' => $author->getFamilyName(null), // Localized | |||
'affiliation' => $author->getAffiliation(null), // Localized |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm... This file is used in the quickSubmit plugin. I do not think we can use the new affiliationField UI component there :-( I/we need to think how to solve it best...
@@ -225,7 +225,7 @@ public function execute(...$functionParams) | |||
$author->setGivenName(array_map('trim', $this->getData('givenName')), null); | |||
$author->setFamilyName($this->getData('familyName'), null); | |||
$author->setPreferredPublicName($this->getData('preferredPublicName'), null); | |||
$author->setAffiliation($this->getData('affiliation'), null); // localized |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note for myself: For this file as well. It is only used in quickSubmit plugin and we need to see how to solve the new affiliations there for 3.5
classes/migration/upgrade/v3_5_0/I7135_CreateNewRorRegistryCacheTables.php
Show resolved
Hide resolved
Hi @bozana, I made a change in the database for rors/ror_settings. I have made more performance tests on my shared hosting. Not sure if my hoster did some downgrades in my hosting, but I found it less performant as my tests before for lookups of rors through the UI. This is due to several sql "like" lookups in rors.ror / ror_settings.setting_value. I added an extra column to rors, namely "search_phrase", where I concatenate the ROR iD (without https://ror.org/) and names during the import. The lookup is now done through a single like only on this column. |
/** | ||
* Get cleaned name, e.g. remove NO_LANG_CODE, set required locale | ||
*/ | ||
public function getNameCleaned(?string $requiredLocale = null): mixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this method to return the names with 'no_lang_code' cleaned. This is used in Affiliation::fromRow. I find this cleaner than mixing this in Affiliation Object.
@asmecher, if I make ask you about that performance issue @GaziYucel mentions above -- what would be a good way to proceed/test/solve... ? |
@bozana and @GaziYucel, would a partial index on the |
Related issues:
Related pull requests: