Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-17012

Contact API ignores <= operator for custom date fields

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.6.6
    • Fix Version/s: 4.6.7, 4.7
    • Component/s: CiviCRM API
    • Labels:
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      Suppose you have a custom datetime field on contacts, and you want to search all contacts that have a date in this field that is earlier than some given date, like e.g.

          $result = civicrm_api3('Contact', 'get', array(
            'sequential' => 1,
            'custom_2' => array('<=' => "2015-08-31"),
          ));
      

      the API ignores 'custom_2' => array('<=' => "2015-08-31") and returns all contacts instead.

        Attachments

          Activity

            People

            • Assignee:
              monish.deb Monish Deb
              Reporter:
              johanv Johan Vervloet
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: