Skip to content

Commit f091ae5

Browse files
authored
Merge pull request #1819 from bozana/7135
pkp/pkp-lib#7135 Multiple author affiliations (ROR)
2 parents e77c197 + ddac4cb commit f091ae5

File tree

18 files changed

+139
-284
lines changed

18 files changed

+139
-284
lines changed

cypress/tests/data/60-content/BbeatySubmission.cy.js

+17-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
22
* @file cypress/tests/data/60-content/BbeatySubmission.cy.js
33
*
4-
* Copyright (c) 2014-2021 Simon Fraser University
5-
* Copyright (c) 2000-2021 John Willinsky
4+
* Copyright (c) 2014-2025 Simon Fraser University
5+
* Copyright (c) 2000-2025 John Willinsky
66
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
77
*
88
* @ingroup tests_data
@@ -34,23 +34,35 @@ describe('Data suite tests', function() {
3434
'givenName': {en: 'Toby'},
3535
'familyName': {en: 'Miller'},
3636
'country': 'CA',
37-
'affiliation': {en: 'University of Alberta'},
37+
'affiliations': [
38+
{
39+
'name': {en: 'University of Alberta'}
40+
}
41+
],
3842
'email': '[email protected]',
3943
userGroupId: Cypress.env('authorUserGroupId')
4044
},
4145
{
4246
'givenName': {en: 'Ira'},
4347
'familyName': {en: 'Wagman'},
4448
'country': 'CA',
45-
'affiliation': {en: 'Athabasca University'},
49+
'affiliations': [
50+
{
51+
'name': {en: 'Athabasca University'}
52+
}
53+
],
4654
'email': '[email protected]',
4755
userGroupId: Cypress.env('authorUserGroupId')
4856
},
4957
{
5058
'givenName': {en: 'Will'},
5159
'familyName': {en: 'Straw'},
5260
'country': 'CA',
53-
'affiliation': {en: 'University of Calgary'},
61+
'affiliations': [
62+
{
63+
'name': {en: 'University of Calgary'}
64+
}
65+
],
5466
'email': '[email protected]',
5567
userGroupId: Cypress.env('authorUserGroupId')
5668
},

cypress/tests/data/60-content/DbernnardSubmission.cy.js

+18-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
22
* @file cypress/tests/data/60-content/DbernnardSubmission.cy.js
33
*
4-
* Copyright (c) 2014-2021 Simon Fraser University
5-
* Copyright (c) 2000-2021 John Willinsky
4+
* Copyright (c) 2014-2025 Simon Fraser University
5+
* Copyright (c) 2000-2025 John Willinsky
66
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
77
*
88
* @ingroup tests_data
@@ -35,23 +35,35 @@ describe('Data suite tests', function() {
3535
'givenName': {en: 'Greg'},
3636
'familyName': {en: 'Bobish'},
3737
'country': 'US',
38-
'affiliation': {en: 'SUNY'},
38+
'affiliations': [
39+
{
40+
'name': {en: 'SUNY'}
41+
}
42+
],
3943
'email': '[email protected]',
4044
userGroupId: Cypress.env('authorUserGroupId')
4145
},
4246
{
4347
'givenName': {en: 'Daryl'},
4448
'familyName': {en: 'Bullis'},
4549
'country': 'US',
46-
'affiliation': {en: 'SUNY'},
50+
'affiliations': [
51+
{
52+
'name': {en: 'SUNY'}
53+
}
54+
],
4755
'email': '[email protected]',
4856
userGroupId: Cypress.env('authorUserGroupId')
4957
},
5058
{
5159
'givenName': {en: 'Jenna'},
5260
'familyName': {en: 'Hecker'},
5361
'country': 'US',
54-
'affiliation': {en: 'SUNY'},
62+
'affiliations': [
63+
{
64+
'name': {en: 'SUNY'}
65+
}
66+
],
5567
'email': '[email protected]',
5668
userGroupId: Cypress.env('authorUserGroupId')
5769
},
@@ -140,7 +152,7 @@ describe('Data suite tests', function() {
140152
cy.login('minoue', null, 'publicknowledge'),
141153
cy.findSubmissionAsEditor('minoue', null, 'Bernnard', null, 'Assigned to me');
142154

143-
155+
144156
// Recommend
145157
cy.clickDecision('Recommend Accept');
146158
cy.recordRecommendation('Recommend Accept', ['Daniel Barnes', 'David Buskins']);

cypress/tests/data/60-content/DkennepohlSubmission.cy.js

+20-4
Original file line numberDiff line numberDiff line change
@@ -33,31 +33,47 @@ describe('Data suite tests', function() {
3333
'givenName': {en: 'Terry'},
3434
'familyName': {en: 'Anderson'},
3535
'country': 'CA',
36-
'affiliation': {en: 'University of Calgary'},
36+
'affiliations': [
37+
{
38+
'name': {en: 'University of Calgary'}
39+
}
40+
],
3741
'email': '[email protected]',
3842
userGroupId: Cypress.env('authorUserGroupId')
3943
},
4044
{
4145
'givenName': {en: 'Paul'},
4246
'familyName': {en: 'Gorsky'},
4347
'country': 'CA',
44-
'affiliation': {en: 'University of Alberta'},
48+
'affiliations': [
49+
{
50+
'name': {en: 'University of Alberta'}
51+
}
52+
],
4553
'email': '[email protected]',
4654
userGroupId: Cypress.env('authorUserGroupId')
4755
},
4856
{
4957
'givenName': {en: 'Gale'},
5058
'familyName': {en: 'Parchoma'},
5159
'country': 'CA',
52-
'affiliation': {en: 'Athabasca University'},
60+
'affiliations': [
61+
{
62+
'name': {en: 'Athabasca University'}
63+
}
64+
],
5365
'email': '[email protected]',
5466
userGroupId: Cypress.env('authorUserGroupId')
5567
},
5668
{
5769
'givenName': {en: 'Stuart'},
5870
'familyName': {en: 'Palmer'},
5971
'country': 'CA',
60-
'affiliation': {en: 'University of Alberta'},
72+
'affiliations': [
73+
{
74+
'name': {en: 'University of Alberta'}
75+
}
76+
],
6177
'email': '[email protected]',
6278
userGroupId: Cypress.env('authorUserGroupId')
6379
},

cypress/tests/data/60-content/MdawsonSubmission.cy.js

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
22
* @file cypress/tests/data/60-content/MdawsonSubmission.cy.js
33
*
4-
* Copyright (c) 2014-2021 Simon Fraser University
5-
* Copyright (c) 2000-2021 John Willinsky
4+
* Copyright (c) 2014-2025 Simon Fraser University
5+
* Copyright (c) 2000-2025 John Willinsky
66
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
77
*
88
* @ingroup tests_data
@@ -34,15 +34,23 @@ describe('Data suite tests', function() {
3434
'givenName': {en: 'Brian'},
3535
'familyName': {en: 'Dupuis'},
3636
'country': 'CA',
37-
'affiliation': {en: 'Athabasca University'},
37+
'affiliations': [
38+
{
39+
'name': {en: 'Athabasca University'}
40+
}
41+
],
3842
'email': '[email protected]',
3943
userGroupId: Cypress.env('authorUserGroupId')
4044
},
4145
{
4246
'givenName': {en: 'Michael'},
4347
'familyName': {en: 'Wilson'},
4448
'country': 'CA',
45-
'affiliation': {en: 'University of Calgary'},
49+
'affiliations': [
50+
{
51+
'name': {en: 'University of Calgary'}
52+
}
53+
],
4654
'email': '[email protected]',
4755
userGroupId: Cypress.env('authorUserGroupId')
4856
}

dbscripts/xml/install.xml

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<!--
44
* dbscripts/xml/install.xml
55
*
6-
* Copyright (c) 2014-2021 Simon Fraser University
7-
* Copyright (c) 2003-2021 John Willinsky
6+
* Copyright (c) 2014-2025 Simon Fraser University
7+
* Copyright (c) 2003-2025 John Willinsky
88
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
99
*
1010
* Installation descriptor file.
@@ -49,9 +49,12 @@
4949
<migration class="APP\migration\install\MetricsMigration" />
5050

5151
<migration class="APP\migration\install\SeriesCategoriesMigration" />
52+
<migration class="PKP\migration\install\AffiliationsMigration" />
53+
<migration class="PKP\migration\install\RorsMigration" />
5254

5355
<code function="createData" />
5456
<code function="createConfig" />
5557
<code function="addPluginVersions"/>
5658
<code function="installDefaultNavigationMenus"/>
59+
<code function="updateRorRegistryDataset"/>
5760
</install>

dbscripts/xml/upgrade.xml

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<!--
44
* dbscripts/xml/upgrade.xml
55
*
6-
* Copyright (c) 2014-2021 Simon Fraser University
7-
* Copyright (c) 2003-2021 John Willinsky
6+
* Copyright (c) 2014-2025 Simon Fraser University
7+
* Copyright (c) 2003-2025 John Willinsky
88
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
99
*
1010
* Upgrade descriptor file.
@@ -150,6 +150,8 @@
150150
<migration class="PKP\migration\upgrade\v3_5_0\FilterClassNames"/>
151151
<migration class="APP\migration\upgrade\v3_5_0\I10620_EditorialBoardMemberRole"/>
152152
<migration class="APP\migration\upgrade\v3_5_0\I9707_WeblateUILocales"/>
153+
<migration class="PKP\migration\upgrade\v3_5_0\I7135_CreateAuthorAffiliationsTables"/>
154+
<migration class="PKP\migration\upgrade\v3_5_0\I7135_CreateNewRorRegistryCacheTables"/>
153155
<note file="docs/release-notes/README-3.5.0" />
154156
</upgrade>
155157

lib/pkp

Submodule pkp updated 51 files

pages/catalog/CatalogBookHandler.php

+7-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
/**
44
* @file pages/catalog/CatalogBookHandler.php
55
*
6-
* Copyright (c) 2014-2021 Simon Fraser University
7-
* Copyright (c) 2003-2021 John Willinsky
6+
* Copyright (c) 2014-2025 Simon Fraser University
7+
* Copyright (c) 2003-2025 John Willinsky
88
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
99
*
1010
* @class CatalogBookHandler
@@ -31,6 +31,7 @@
3131
use APP\submission\Submission;
3232
use APP\template\TemplateManager;
3333
use PKP\citation\CitationDAO;
34+
use PKP\core\Core;
3435
use PKP\core\PKPApplication;
3536
use PKP\core\PKPRequest;
3637
use PKP\db\DAORegistry;
@@ -298,6 +299,10 @@ public function book($args, $request)
298299
'orcidUnauthenticatedIcon' => OrcidManager::getUnauthenticatedIcon(),
299300
]);
300301

302+
$rorIconPath = Core::getBaseDir() . '/' . PKP_LIB_PATH . '/templates/images/ror.svg';
303+
$rorIdIcon = file_exists($rorIconPath) ? file_get_contents($rorIconPath) : '';
304+
$templateMgr->assign('rorIdIcon', $rorIdIcon);
305+
301306
// Ask robots not to index outdated versions and point to the canonical url for the latest version
302307
if ($this->publication->getId() != $submission->getData('currentPublicationId')) {
303308
$templateMgr->addHeader('noindex', '<meta name="robots" content="noindex">');

plugins/generic/googleScholar/GoogleScholarPlugin.php

+7-5
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
/**
44
* @file plugins/generic/googleScholar/GoogleScholarPlugin.php
55
*
6-
* Copyright (c) 2014-2022 Simon Fraser University
7-
* Copyright (c) 2003-2022 John Willinsky
6+
* Copyright (c) 2014-2025 Simon Fraser University
7+
* Copyright (c) 2003-2025 John Willinsky
88
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
99
*
1010
* @class GoogleScholarPlugin
@@ -18,7 +18,6 @@
1818
use APP\template\TemplateManager;
1919
use PKP\citation\CitationDAO;
2020
use PKP\db\DAORegistry;
21-
use PKP\i18n\LocaleConversion;
2221
use PKP\plugins\GenericPlugin;
2322
use PKP\plugins\Hook;
2423

@@ -107,8 +106,11 @@ public function monographView($hookName, $args)
107106
$authors = $isChapterRequest ? $templateMgr->getTemplateVars('chapterAuthors') : $publication->getData('authors');
108107
foreach ($authors as $i => $author) {
109108
$templateMgr->addHeader('googleScholarAuthor' . $i++, '<meta name="citation_author" content="' . htmlspecialchars($author->getFullName(false, false, $publicationLocale)) . '"/>');
110-
if ($affiliation = htmlspecialchars($author->getLocalizedData('affiliation', $publicationLocale))) {
111-
$templateMgr->addHeader('googleScholarAuthor' . $i++ . 'Affiliation', '<meta name="citation_author_institution" content="' . $affiliation . '"/>');
109+
foreach ($author->getAffiliations() as $affiliation) {
110+
$templateMgr->addHeader(
111+
'googleScholarAuthor' . $i++ . 'Affiliation' . $affiliation->getId(),
112+
'<meta name="citation_author_institution" content="' . htmlspecialchars($affiliation->getLocalizedName($publicationLocale)) . '"/>'
113+
);
112114
}
113115
}
114116

plugins/importexport/native/README.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Native Import/Export Plugin
2+
3+
## Documentation
4+
5+
See https://docs.pkp.sfu.ca/admin-guide/en/data-import-and-export#native-xml-plugin
6+
for documentation.
7+
8+
## Sample XML
9+
10+
Sample XML can be found in https://github.com/pkp/datasets/blob/main/omp/[branch]/mysql/native-export-sample.xml,
11+
where [branch] indicates the GitHub repository branch name of your OMP version, e.g.: stable-3_3_0 for OMP 3.3.0-x, stable-3_4_0 for OMP 3.4.0-8.

plugins/importexport/native/sample.xml

-221
This file was deleted.

plugins/importexport/onix30/filter/MonographONIX30XmlFilter.php

+11-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
/**
44
* @file plugins/importexport/onix30/filter/MonographONIX30XmlFilter.php
55
*
6-
* Copyright (c) 2014-2024 Simon Fraser University
7-
* Copyright (c) 2000-2024 John Willinsky
6+
* Copyright (c) 2014-2025 Simon Fraser University
7+
* Copyright (c) 2000-2025 John Willinsky
88
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
99
*
1010
* @class MonographONIX30XmlFilter
@@ -16,6 +16,7 @@
1616

1717
namespace APP\plugins\importexport\onix30\filter;
1818

19+
use APP\author\Author;
1920
use APP\codelist\ONIXCodelistItemDAO;
2021
use APP\core\Application;
2122
use APP\facades\Repo;
@@ -371,6 +372,7 @@ public function createProductNode(DOMDocument $doc, Submission $submission, Publ
371372
$authors = $publication->getData('authors'); // sorts by sequence.
372373
$sequence = 1;
373374
foreach ($authors as $author) {
375+
/** @var Author $author */
374376
$contributorNode = $doc->createElementNS($deployment->getNamespace(), 'Contributor');
375377
$contributorNode->appendChild($this->buildTextNode($doc, 'SequenceNumber', $sequence));
376378

@@ -397,6 +399,13 @@ public function createProductNode(DOMDocument $doc, Submission $submission, Publ
397399
$contributorNode->appendChild($this->buildTextNode($doc, 'KeyNames', $author->getFullName(false, false, $pubLocale)));
398400
}
399401

402+
foreach ($author->getAffiliations() as $affiliation) {
403+
$affiliationName = $affiliation->getLocalizedName($pubLocale);
404+
$professionalAffiliationNode = $doc->createElementNS($deployment->getNamespace(), 'ProfessionalAffiliation');
405+
$professionalAffiliationNode->appendChild($this->buildTextNode($doc, 'Affiliation', $affiliationName));
406+
$contributorNode->appendChild($professionalAffiliationNode);
407+
}
408+
400409
if ($author->getBiography($pubLocale) != '') {
401410
$contributorNode->appendChild($this->buildTextNode($doc, 'BiographicalNote', $author->getBiography($pubLocale)));
402411
}

plugins/metadata/dc11/filter/Dc11SchemaPublicationFormatAdapter.php

+3-11
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
/**
44
* @file plugins/metadata/dc11/filter/Dc11SchemaPublicationFormatAdapter.php
55
*
6-
* Copyright (c) 2014-2024 Simon Fraser University
7-
* Copyright (c) 2000-2024 John Willinsky
6+
* Copyright (c) 2014-2025 Simon Fraser University
7+
* Copyright (c) 2000-2025 John Willinsky
88
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
99
*
1010
* @class Dc11SchemaPublicationFormatAdapter
@@ -86,15 +86,7 @@ public function extractMetadataFromDataObject(&$publicationFormat)
8686

8787
// Creator
8888
foreach ($publication->getData('authors') as $author) {
89-
$authorNames = $author->getFullNames(false, true);
90-
foreach ($authorNames as $locale => &$authorName) {
91-
$affiliation = $author->getAffiliation($locale);
92-
if (!empty($affiliation)) {
93-
$authorName .= '; ' . $affiliation;
94-
}
95-
}
96-
$this->_addLocalizedElements($dc11Description, 'dc:creator', $authorNames);
97-
unset($authorName);
89+
$this->_addLocalizedElements($dc11Description, 'dc:creator', $author->getFullNames(false, true));
9890
}
9991

10092
// Subject

0 commit comments

Comments
 (0)