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

Custom Search without a "WHERE" clause fails when used as a smart group

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Won't Fix
    • Affects Version/s: 4.1.3
    • Fix Version/s: None
    • Component/s: Core CiviCRM
    • Labels:
      None
    • Documentation Required?:
      None

      Description

      I created a custom search that does not have a "Where" clause. (This is intentional, as it has a complex join and the criteria is part of the join clause)

      The custom search works fine if I run it directly, but it fails when used as a smart group.

      From debugging, it seems the code in file "CRM/Contact/BAO?GroupContactCache.php" assumes there is a where clause in the SQL, as th SQL fragment it adds start with "AND ..."

        Attachments

          Activity

            People

            • Assignee:
              dgg David Greenberg
              Reporter:
              sgladstone Sarah Gladstone
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: