CRM-1152 Search - False Positives on Multiple Value Custom Fields

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: None
    • Fix Version/s: 1.5
    • Component/s: None
    • Labels:
      None

      Description

      As reported by Dave Jenkins. Pls verify. If recreated - fix, else get back to Dave J. to request more info, etc.
      ========================
      This is related to our modification in how we store multi-value custom data (e.g. checkboxes and multi-selects). The new datastore model is [Ctrl-A]4[Ctrl-A]14[Ctrl-A] - rather than 4[Ctrl-A]14 .... so searches for option 4 should actually look for [Ctrl-A]4[Ctrl-A] which eliminates false positives. According to dave, this isn't working...

      ---- original post ----
      I'm hoping this will be fixed by CRM-1008, "Custom
      > > Checkbox and
      > > Multi-select Fields - Store and Handle Leading and
      > > Trailing Delimiter
      > > (Ctrl A)" but wanted to confirm this; otherwise I'll
      > > post a bug report.
      > >
      > > I have a custom field set up as Alphanumeric,
      > > CheckBox. There are 18
      > > options, with values "1" - "18". When I search on
      > > the term with value
      > > "1" ("Advice"), it incorrectly picks up contacts
      > > that don't have Advice
      > > selected but do have e.g. "Play", which has value
      > > "14". The "char_data"
      > > field for one contact that incorrectly matches on
      > > "1" is "4[Ctrl-A]14".

        Attachments

          Activity

          [CRM-1152] Search - False Positives on Multiple Value Custom Fields
          Donald A. Lobo added a comment -

          fixed, i had added code which adds the separator to the values instead of they keys.

          tested and fixed in my sandbox

          Dave Jenkins added a comment -

          Tested on v1.5 rev6646M with Custom(Field|Query).php replaced with r6653 versions. Search now retrieves the correct contacts However there's an issue with how the custom field labels display following a profile search (only - OK for advanced search), both in the results list and contact detail page. E.g. (writing '|' for Ctrl-A):
          char_data '|1|13|' displays as ', Advice' - should be 'Advice, Housing/Homelessness';
          char_data '|1|' displays as blank - should be 'Advice'.
          Let me know if there's another file I should have updated.

          Donald A. Lobo added a comment -

          DaveJ:

          I would wait for the next beta and try to reproduce. When i fixed it i'm pretty sure i checked the qill etc. Also not sure what part of the svn u r pulling your changes from, but we branched a few days ago etc and the correct branch is: http://svn.civicrm.org/branches/v1.5

          we'll probably release a new beta sometime over the weekend

          Dave Jenkins added a comment -

          Tested and working correctly in 1.5BETA-rev6706, thanks!

            People

            • Assignee:
              Kurund Jalmi
              Reporter:
              David Greenberg

              Dates

              • Created:
                Updated:
                Resolved: