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

Allow Exact Name Search - Find Contacts and Find Target Contacts for Relationships


    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Critical
    • Resolution: Fixed/Completed
    • Affects Version/s: 1.8
    • Fix Version/s: 2.1
    • Component/s: Core CiviCRM
    • Labels:


      Currently, we append % and do LIKE criteria matching for the following search interfaces (and there is no way to tell these interfaces to do an exact string match):

      • Find Contacts (contact/search/basic) - search on Contact Name
      • Advanced Search (contact/search/advanced) - search on Contact Name, Email Address, Relationship Target Contact
      • Create / Edit Relationships (contact/view/rel?action=add) - find Target Contact

      For these interfaces, if the user surrounds the string with double-quotes - then the search should use the exact string instead of LIKE 'string%'.

      ---- Original Bug Post --------------
      While trying to create a relationship, if the Find Target Contact search returns a lot of results, it throws the error "Too many matching results. Please narrow your search by entering a more complete target contact name." But typing in the exact name of the target contact doesn't solve the problem.

      This is happening when there are a lot of organizations in the database that have similar names (which is a problem that many issue-based organizations will face). For example, I am trying to create a Parent Organization of / Child Organization of relationship between "Center for Reproductive Rights" and "Center for Reproductive Rights - Africa Program".

      When doing a normal search, typing in the exact organization name brings up 60+ results of organizations that have all combinations of Center, Reproductive, and Rights in the name. Paging through all these results is a bit cumbersome when I know the exact name but at least I can find it eventually. When trying to create the relationship, it just throws the error and it's impossible to create any relationships.

      This has been replicated on the demo.





            • Assignee:
              deepak Deepak Srivastava
              colinsagan Colin Sagan
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: