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

Searching by display_name gives weird search results

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.4
    • Fix Version/s: None
    • Labels:
      None

      Description

      The following snippet gives strange (and wrong) search results when doing a wild-card search with crm_contact_search:

      $return_fields = array('display_name' => 1,
      'contact_id' => 1,
      'contact_type' => 1,
      );
      $param = array('display_name' => '%tony%');
      $rslt = crm_contact_search($params, $return_fields);

      Using the civirm_generated.mysql file from the 1.4 alpha drop, $rslt[0] contains records for cid = (0,2,4,6,8,16, 19). Changing the key from "tony" to something else yields the same 8 records: Except for the weird case of cid == NULL, the rest of the CID seem to point to real records.

      Since there isn't an OR search in 1.4, I really do need search on display_name to work in this release.

      Dr Amar X Grant Jr

      Individual
      Mr Rebecca G Adams Jr

      Individual
      Ms Purvi V Adams Sr

      Individual
      Rebecca Samuels's home

      Household
      Ms Brz?czys?aw U ??chowski Sr

      Individual
      Mrs Paula V Adams Sr

      Individual
      Dr Sheila D Samuels Jr

      Individual

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              torenware Rob Thorne
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: