One of our journals is migrating some back issues from a legacy system to OJS 3.3.0.22. The workflow is as follows:
- Handmade native XMLs, containing errors in metadata (courtesy of the data source), are uploaded to the test OJS.
- The metadata are corrected manually in the test OJS via the web interface.
- The more or less accurate native XMLs are exported from the test installation and reimported into the production OJS.
The problem is that this journal heavily relies on preferredPublicNames for displaying the author names, and these names are not exported to the native XMLs. Hence, these names cannot be seamlessly transferred from test to prod via XMLs.
This post OJS3 Native XML import - #5 by Ph_We mentions this problem, and this How do I import "Preferred Public Name" data with OJS 3.2 Users XML Plugin says that users XML also doesn’t contain the preferredPublicName field.
The questions are:
- Is it “by design” or a minor bug?
- How to transfer the preferred public names?
Regarding 2nd question, the only thing I can suggest is to run something like
SELECT
author_id,
locale,
MAX(CASE WHEN setting_name = 'givenName' THEN setting_value END) AS givenName,
MAX(CASE WHEN setting_name = 'familyName' THEN setting_value END) AS familyName,
MAX(CASE WHEN setting_name = 'preferredPublicName' THEN setting_value END) AS preferredPublicName
FROM
author_settings
WHERE
setting_name IN ('givenName', 'familyName', 'preferredPublicName')
GROUP BY
author_id,
locale
HAVING
preferredPublicName IS NOT NULL
AND TRIM(preferredPublicName) != '';
against the test database and then write some kind of script to add or update preferredPublicNames based on the matching givenName - familyName pairs in the prod database.