From f83559feb8c8773a2379be8380c792b565cfd00a Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Mon, 14 Jun 2021 11:49:49 -0700 Subject: [PATCH] Correct creator fields in OpenURL (#2079) There is no isInstitution field, so OpenURL search was producing invalid data for items with institutional authors. Instead we use the name field in API JSON and the isInstitution flag in internal JSON. --- chrome/content/zotero/xpcom/openurl.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/openurl.js b/chrome/content/zotero/xpcom/openurl.js index 9e6ad0bf78..42f8441773 100644 --- a/chrome/content/zotero/xpcom/openurl.js +++ b/chrome/content/zotero/xpcom/openurl.js @@ -210,8 +210,8 @@ Zotero.OpenURL = new function() { _mapTag(firstCreator.firstName, "invfirst"); _mapTag(firstCreator.lastName, "invlast"); } else { - if(firstCreator.isInstitution) { - _mapTag(firstCreator.lastName, "aucorp"); + if (firstCreator.name) { + _mapTag(firstCreator.name, "aucorp"); } else { _mapTag(firstCreator.firstName, "aufirst"); _mapTag(firstCreator.lastName, "aulast"); @@ -407,7 +407,7 @@ Zotero.OpenURL = new function() { item.creators.push(_cloneIfNecessary(Zotero.Utilities.cleanAuthor(value, type, value.indexOf(",") !== -1), item)); } else if(key == "rft.aucorp") { - complexAu.push(_cloneIfNecessary({lastName:value, isInstitution:true}, item)); + complexAu.push(_cloneIfNecessary({lastName:value, fieldMode:1}, item)); } else if(key == "rft.isbn" && !item.ISBN) { item.ISBN = value; } else if(key == "rft.pub" || key == "rft.publisher") {