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

Add the reference published year as a string to meta to preserve any suffixes #1088

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

will-byrne
Copy link
Collaborator

Fix for https://github.com/elifesciences/enhanced-preprints-issues/issues/815

Adds the unprocessed year published string to the meta if it is present to preserve the suffix without requiring a schema change.

datePublishedString !== undefined &&
(datePublishedString.length > 4 || datePublished === undefined)
) {
metaEntries.yearPublished = datePublishedString
Copy link
Collaborator

Choose a reason for hiding this comment

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

My suggestion is that we just store string in meta.yearPublished if it is defined.

if (datePublishedString !== undefined) {
  metaEntries.yearPublished = datePublishedString
}

This will simplify the logic in client too. The only thing tricky in client is to have a fallback id meta.yearPublished is not defined to use datePublished until we do a full reimport.

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