Addresses #346, mapping for new item types
Fix for base field not being included (only type-specific fields) when searching by a base field
This commit is contained in:
parent
b1a025be92
commit
4ffaaa9eea
|
@ -582,9 +582,14 @@ Zotero.Search.prototype._buildQuery = function(){
|
|||
break;
|
||||
}
|
||||
|
||||
// Add base field
|
||||
condSQLParams.push(
|
||||
Zotero.ItemFields.getID(condition['alias'])
|
||||
);
|
||||
var typeFields = Zotero.ItemFields.getTypeFieldsFromBase(condition['alias']);
|
||||
if (typeFields) {
|
||||
condSQL += 'fieldID IN (';
|
||||
condSQL += 'fieldID IN (?,';
|
||||
// Add type-specific fields
|
||||
for each(var fieldID in typeFields) {
|
||||
condSQL += '?,';
|
||||
condSQLParams.push(fieldID);
|
||||
|
@ -594,9 +599,6 @@ Zotero.Search.prototype._buildQuery = function(){
|
|||
}
|
||||
else {
|
||||
condSQL += 'fieldID=? AND ';
|
||||
condSQLParams.push(
|
||||
Zotero.ItemFields.getID(condition['alias'])
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user