diff --git a/chrome/content/zotero/import/mendeley/mendeleyImport.js b/chrome/content/zotero/import/mendeley/mendeleyImport.js index 5934fbb021..22d099c21c 100644 --- a/chrome/content/zotero/import/mendeley/mendeleyImport.js +++ b/chrome/content/zotero/import/mendeley/mendeleyImport.js @@ -1042,7 +1042,7 @@ Zotero_Import_Mendeley.prototype._documentToAPIJSON = async function (map, docum } parent.tags = []; // Add star tag for favorites - if (documentRow.favourite == 'true') { + if (documentRow.favourite === 'true' || documentRow.favourite === true) { parent.tags.push('\u2605'); } if (tags) { @@ -1240,6 +1240,11 @@ Zotero_Import_Mendeley.prototype._saveItems = async function (libraryID, json) { if (itemJSON.publicationTitle && !item.getField('publicationTitle')) { item.setField('publicationTitle', itemJSON.publicationTitle); } + + // Add "★" tag if not present, since it was previously missed in the online importer + if ((itemJSON.tags || []).includes('\u2605') && !item.hasTag('\u2605')) { + item.addTag('\u2605'); + } // Update any child items to point to the existing item's key instead of the // new generated one diff --git a/chrome/content/zotero/import/mendeley/mendeleyOnlineMappings.js b/chrome/content/zotero/import/mendeley/mendeleyOnlineMappings.js index 6887acf25f..7bfa71120f 100644 --- a/chrome/content/zotero/import/mendeley/mendeleyOnlineMappings.js +++ b/chrome/content/zotero/import/mendeley/mendeleyOnlineMappings.js @@ -50,6 +50,7 @@ var mendeleyOnlineMappings = { short_title: 'shortTitle', source: 'publication', source_type: 'sourceType', + starred: 'favourite', tags: false, // tags handled separately translators: false, // all author types handled separately user_context: 'userContext',