Search Builder greater than and lesser than operators for contribution total amount omitted
To reproduce:
- Go to Search -> Search generator
- Choose Contribution -> Total Amount
- No greater than, lesser than, greater than equal, lesser than equal operators are present.
My guess is that the field gets treated as a String, therefore the operator is omitted in Builder.js
// based on data type remove invalid operators e.g. IS EMPTY doesn't work with Boolean type column if ((field in CRM.searchBuilder.fieldTypes) === true) { if (CRM.searchBuilder.fieldTypes[field] == 'Boolean') { CRM.searchBuilder.generalOperators = _.omit(CRM.searchBuilder.generalOperators, ['IS NOT EMPTY', 'IS EMPTY']); } else if (CRM.searchBuilder.fieldTypes[field] == 'String') { CRM.searchBuilder.generalOperators = _.omit(CRM.searchBuilder.generalOperators, ['>', '<', '>=', '<=']); } } buildOperator(operator, CRM.searchBuilder.generalOperators);