commit bdeff96162b273f8dd4870cee786a596bca2acd6
parent dcfdf27c0b8348fa6e29b7768d0a01339e0ad310
Author: Simon Kornblith <simon@simonster.com>
Date: Wed, 3 Oct 2012 17:54:21 -0400
Don't skip base fields that are mapped to a field with the same name
Diffstat:
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
@@ -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
@@ -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
}