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

Search Builder incorrectly returning no entries.

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 3.1.2
    • Fix Version/s: 3.2
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      Note pre-upgrade smartgroups are affected

      Steps to replicate on Sandbox
      http://sandbox.civicrm.org/civicrm/contact/search/builder&reset=1
      fill in : contribution / receive date / => 20081109

      No matches found for: Receive Date >= "20081119"

      SELECT DISTINCT(contact_a.id) as contact_id, contact_a.contact_type as `contact_type`, contact_a.contact_sub_type as `contact_sub_type`, contact_a.sort_name as `sort_name`, civicrm_contribution.id as contribution_id, civicrm_contribution.receive_date as `receive_date` FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id WHERE ( ( LOWER(civicrm_contribution.receive_date) >= 20091119 AND civicrm_contribution.is_test = 0 ) ) AND ( 1 ) ORDER BY contact_a.sort_name asc

      Is the query run & it returns no results in sql either

      but if I add ' around the date it does work:
      SELECT DISTINCT (contact_a.id) AS contact_id, contact_a.contact_type AS `contact_type` , contact_a.contact_sub_type AS `contact_sub_type` , contact_a.sort_name AS `sort_name` , civicrm_contribution.id AS contribution_id, civicrm_contribution.receive_date AS `receive_date`
      FROM civicrm_contact contact_a
      LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id
      WHERE ((LOWER( civicrm_contribution.receive_date ) >= '20091119'
      AND civicrm_contribution.is_test =0))
      AND ( 1 )
      ORDER BY contact_a.sort_name ASC

        Attachments

          Activity

            People

            • Assignee:
              ashwini Ashwini Poharkar
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: