CRM-16575 Searching/reporting on similar values in multi select fields breaks

    Details

      Description

      If a multi select custom field has values of "Cheese", "Cheese-board" and "Cheese plate", searching for "Cheese" in a report or a search will return all of these values even though it should only return "Cheese".

      Proposed solution @ http://forum.civicrm.org/index.php/topic,36466.0.html

        Attachments

          Issue Links

            Activity

            [CRM-16575] Searching/reporting on similar values in multi select fields breaks
            Monish Deb added a comment -

            Alex C I was unable to execute the changes of your PR. I created a search'able Custom field (Alphanumeric >> Check Box) and used "Cheese", "Cheese-board" and "Cheese plate" values for it. But when I do Advance search on those custom field value(s), the code executes https://github.com/civicrm/civicrm-core/blame/master/CRM/Core/BAO/CustomQuery.php#L351 and eventually at L377 it "continue" never proceed to next code. Also I tried with other combination for configuring multi-select field but with no success.

            Can you please replicate this in our dmaster demo site http://dmaster.demo.civicrm.org/ (if possible please attach the screenshots)? Thanks

            Alex C added a comment -

            I have setup a multiselect custom field on dmaster called 'multi select food'

            I have populated 4 records with different values.

            Using advanced search 1 record is returned for 'Cheese' (all good)

            Using search builder or reporting 4 records are returned for 'Cheese' (not so good)
            http://dmaster.demo.civicrm.org/civicrm/report/instance/38?reset=1

            Monish Deb added a comment - - edited

            Thanks for your feedback . I did some additional changes to make it work with all kind of operators in Search Builder (as I was having some trouble with IN/NOT IN operator), also fixed the Qill message. Submitted new PR https://github.com/civicrm/civicrm-core/pull/6044 and cherry picked your commits. Please check my additional changes if it doesn't break any of your use-case.

            omar abu hussein added a comment - - edited

            can someone with access update this ticket fix version and adds 4.6 since it is fixed in this PR : https://github.com/civicrm/civicrm-core/pull/9440

              People

              • Assignee:
                Monish Deb
                Reporter:
                Alex C

                Dates

                • Created:
                  Updated:
                  Resolved: