Merge pull request #261 from gracile-fr/3.1-quickSearch-date
Include dateDecided, dateEnacted, issueDate in "Title, Creator, Year"
This commit is contained in:
commit
aa458dcd63
1 changed files with 13 additions and 1 deletions
|
@ -1197,8 +1197,20 @@ Zotero.Search.prototype._buildQuery = function(){
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'year':
|
case 'year':
|
||||||
condSQL += 'fieldID IN (?) AND ';
|
|
||||||
condSQLParams.push(Zotero.ItemFields.getID('date'));
|
condSQLParams.push(Zotero.ItemFields.getID('date'));
|
||||||
|
//Add base field
|
||||||
|
var dateFields = Zotero.ItemFields.getTypeFieldsFromBase('date');
|
||||||
|
if (dateFields) {
|
||||||
|
condSQL += 'fieldID IN (?,';
|
||||||
|
// Add type-specific date fields (dateEnacted, dateDecided, issueDate)
|
||||||
|
for each(var fieldID in dateFields) {
|
||||||
|
condSQL += '?,';
|
||||||
|
condSQLParams.push(fieldID);
|
||||||
|
}
|
||||||
|
condSQL = condSQL.substr(0, condSQL.length - 1);
|
||||||
|
condSQL += ') AND ';
|
||||||
|
}
|
||||||
|
|
||||||
condSQL += "valueID IN (SELECT valueID FROM "
|
condSQL += "valueID IN (SELECT valueID FROM "
|
||||||
+ "itemDataValues WHERE ";
|
+ "itemDataValues WHERE ";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue