CRM-11603 Include/Exclude Custom Search "AND" function not working

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 4.2.7
    • Fix Version/s: 4.2.8
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      Replicated on demo site:
      civicrm/contact/search/custom?csid=4&reset=1

      This custom search returns the same results regardless which radio button you choose: and/or. The desired behavior is if "and" is chosen the results will be smaller (as ALL criteria must be met) but in fact the results are the same as OR. It appears that AND is not working at all.

      I have interest in sponsoring this bug if you let me know how it is fixed or can provide an estimate. My exploration of the code hasn't resulted in me understanding why it is not working. Thanks!

        Attachments

          Activity

          [CRM-11603] Include/Exclude Custom Search "AND" function not working
          Donald A. Lobo added a comment -

          I just took a quick look at the code. The intent of the code (contributed) was to:

          1. Allow folks to decide if they wanted the all contacts in groups A,B,C AND/OR tags X, Y, X

          i.e. the AND/OR applies only to the include groups and is across the objects Groups , Tags

          stoob: For 4.2, i think we should keep the same functionality but clarify the text in the radio buttons

          There are unit tests that actually test that functionality.

          Donald A. Lobo added a comment -

          I made a few changes for this in svn, including setting the default and fixing the text a wee bit.

          Stuart, can u do a quick review. the demo site is updated with the latest code from svn

          We should close this issue and open up a new issue if there is different functionality you need

          Stoob added a comment -

          Now that you describe it this way, I can see how the language was causing confusion. I like the new language better, but I suggest simply it to say this:

          • Show results that meet the Groups criteria AND the Tags criteria
          • Show results that meet the Groups criteria OR the Tags criteria
          Donald A. Lobo added a comment -

          the behavior is working as designed

          we cleaned up the language to make it more clear what it is supposed to do

            People

            • Assignee:
              Donald A. Lobo
              Reporter:
              Stoob

              Dates

              • Created:
                Updated:
                Resolved: