From bdeff96162b273f8dd4870cee786a596bca2acd6 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Wed, 3 Oct 2012 17:54:21 -0400 Subject: [PATCH] Don't skip base fields that are mapped to a field with the same name --- chrome/content/zotero/xpcom/translation/translate_item.js | 2 +- chrome/content/zotero/xpcom/utilities.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/translation/translate_item.js b/chrome/content/zotero/xpcom/translation/translate_item.js index 8cff06292..fb4db78d4 100644 --- a/chrome/content/zotero/xpcom/translation/translate_item.js +++ b/chrome/content/zotero/xpcom/translation/translate_item.js @@ -388,7 +388,7 @@ Zotero.Translate.ItemSaver.prototype = { // Skip mapping if item field already exists var fieldName = Zotero.ItemFields.getName(fieldID); - if(item[fieldName]) continue; + if(fieldName !== field && item[fieldName]) continue; if(fieldID) { Zotero.debug("Translate: Mapping "+field+" to "+fieldName, 5); diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js index ae17c3545..b7df62eb9 100644 --- a/chrome/content/zotero/xpcom/utilities.js +++ b/chrome/content/zotero/xpcom/utilities.js @@ -1264,7 +1264,7 @@ Zotero.Utilities = { if((itemFieldID = Zotero.ItemFields.getFieldIDFromTypeAndBase(typeID, fieldID))) { var fieldName = Zotero.ItemFields.getName(itemFieldID); // Only map if item field does not exist - if(!newItem[fieldName]) newItem[fieldName] = val; + if(fieldName !== field && !newItem[fieldName]) newItem[fieldName] = val; continue; // already know this is valid }