Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • C CiviCRM Core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,376
    • Issues 1,376
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • CiviCRM Core
  • Issues
  • #194

Closed
Open
Created Jun 20, 2018 by Matthias Bärnthaler@baerm

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);

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking