From d27b622f9f8fe7b9c2fea25e678ef232c5ca032e Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 6 May 2021 15:59:03 -0400 Subject: [PATCH] Mendeley import: Fill in Publication field on existing items if empty It was skipped in online imports before eef0fc6fa8. --- chrome/content/zotero/import/mendeley/mendeleyImport.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/chrome/content/zotero/import/mendeley/mendeleyImport.js b/chrome/content/zotero/import/mendeley/mendeleyImport.js index a999c516ef..4a896f2e74 100644 --- a/chrome/content/zotero/import/mendeley/mendeleyImport.js +++ b/chrome/content/zotero/import/mendeley/mendeleyImport.js @@ -1225,6 +1225,12 @@ Zotero_Import_Mendeley.prototype._saveItems = async function (libraryID, json) { if (item.isRegularItem()) { lastExistingParentItem = item; + // Fill in Publication if empty, since it was missed in an early version of the + // online importer + if (itemJSON.publicationTitle && !item.getField('publicationTitle')) { + item.setField('publicationTitle', itemJSON.publicationTitle); + } + // Update any child items to point to the existing item's key instead of the // new generated one this._updateParentKeys('item', json, i + 1, itemJSON.key, item.key);