diff --git a/chrome/content/zotero/xpcom/search.js b/chrome/content/zotero/xpcom/search.js index 56c7655daa..391780c44b 100644 --- a/chrome/content/zotero/xpcom/search.js +++ b/chrome/content/zotero/xpcom/search.js @@ -1150,6 +1150,7 @@ Zotero.Search.prototype._buildQuery = function(){ break; case 'creator': + case 'lastName': condSQL += "creatorID IN (SELECT creatorID FROM creators " + "NATURAL JOIN creatorData WHERE "; openParens++; @@ -1822,6 +1823,19 @@ Zotero.SearchConditions = new function(){ field: "firstName || ' ' || lastName" }, + { + name: 'lastName', + operators: { + is: true, + isNot: true, + contains: true, + doesNotContain: true + }, + table: 'itemCreators', + field: 'lastName', + special: true + }, + { name: 'field', operators: {