Skip to content

fix: cherry-pick subtitle + published-print date fix from giancarlodigi/ZotMeta#2

Closed
Copilot wants to merge 3 commits intomasterfrom
copilot/pick-pull-14-from-repo
Closed

fix: cherry-pick subtitle + published-print date fix from giancarlodigi/ZotMeta#2
Copilot wants to merge 3 commits intomasterfrom
copilot/pick-pull-14-from-repo

Conversation

Copy link

Copilot AI commented Feb 27, 2026

Applies the fix from giancarlodigi/ZotMeta#master (upstream PR RoadToDream/ZotMeta#14) to address two CrossRef metadata parsing bugs:

  • Subtitle dropped from titlesubtitle[0] was silently ignored; now appended with ": " separator (falls back to subtitle-only if no main title)
  • Wrong publication yearpublished.date-parts (online-first date) was used instead of published-print.date-parts (volume/issue date)
// subtitle handling
var Subtitles = Utilities.safeGetFromJson(dataJson, ["subtitle"]); 
if (Subtitles && Subtitles.length > 0) { 
    var subtitleText = Subtitles[0]; 
    Title = Title ? Title + ": " + subtitleText : subtitleText; 
}

// prefer print date over online date
var publishedPrintDate = Utilities.safeGetFromJson(dataJson, ["published-print", "date-parts"]); 
if (publishedPrintDate && publishedPrintDate.length > 0) { 
    PublishDate = this.generateDate(publishedPrintDate); 
} 
Original prompt

This section details on the original issue you should resolve

<issue_title>Pick RoadToDream#14</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: jeanwsr <33128597+jeanwsr@users.noreply.github.com>
Copilot AI changed the title [WIP] Pick pull request 14 from ZotMeta repository fix: journal title subtitle handling and published-print date preference Feb 27, 2026
@jeanwsr
Copy link
Owner

jeanwsr commented Feb 27, 2026

@copilot can you fetch the original author's commit instead of rewrite one.

Co-authored-by: giancarlo <87204453+giancarlodigi@users.noreply.github.com>

Co-authored-by: jeanwsr <33128597+jeanwsr@users.noreply.github.com>
Copy link
Author

Copilot AI commented Feb 27, 2026

@copilot can you fetch the original author's commit instead of rewrite one.

Done. Replaced the rewrite with the exact file content from the original author's commit (giancarlodigi@9819352) — the diff against the base now matches the original PR exactly (blob SHA e398fd9..05513e4). Committed in 1208955.

Copilot AI changed the title fix: journal title subtitle handling and published-print date preference fix: cherry-pick subtitle + published-print date fix from giancarlodigi/ZotMeta Feb 27, 2026
@jeanwsr jeanwsr closed this Feb 27, 2026
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.

Pick https://github.com/RoadToDream/ZotMeta/pull/14

2 participants