CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • [SOLVED] Custom checkboxes search & reporting incorrect
Pages: [1]

Author Topic: [SOLVED] Custom checkboxes search & reporting incorrect  (Read 371 times)

clarkac

  • Administrator
  • Ask me questions
  • *****
  • Posts: 399
  • Karma: 11
  • CiviCRM version: 4.4.11 & 4.5.5
  • CMS version: Drupal 7
  • MySQL version: 5.1.61-cll
  • PHP version: 5.3.27
[SOLVED] Custom checkboxes search & reporting incorrect
October 27, 2013, 05:14:02 am
I've set up a custom checkbox with 7 items - availability for each day of the week.  So someone might check both 'Sunday' and 'Monday' while someone else will just check 'Sunday'.   Problem is if I search for who is available Sunday - using Advanced or Builder then the only contact returned is where only Sunday was checked.  Which is obviously incorrect.

But this isn't true for the built-in checkboxes - for example, communication preferences.  If you search on these, it will return contacts correctly.  Maybe because these are individual checkboxes, where my custom checkboxes are one set?

Is this a bug or am I misunderstanding something?
« Last Edit: October 28, 2013, 02:26:30 am by clarkac »
Andy Clark

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Custom checkboxes search & reporting incorrect (I think)
October 27, 2013, 08:21:53 am

if i had to guess, the civi search code does not account nicely for custom fields that are of type multi-select (i suspect multi-select came in after the search code)

this will need to be a code change / feature addition. Would help if someone can take a look and contribute a patch and/or sponsor a developer to do the needful. I suspect its a 10-20 hours fix

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

clarkac

  • Administrator
  • Ask me questions
  • *****
  • Posts: 399
  • Karma: 11
  • CiviCRM version: 4.4.11 & 4.5.5
  • CMS version: Drupal 7
  • MySQL version: 5.1.61-cll
  • PHP version: 5.3.27
Re: Custom checkboxes search & reporting incorrect (I think)
October 28, 2013, 02:25:58 am
Hey, scrub this!  I was wrong - Civi does correctly search these checkbox and multi-select boxes.  I used 'RLIKE' in Search Builder and clicked 'Check to match ANY' in Advanced Search and got the right results.  Sorry... (backs away with tail between his legs)... :-\
Andy Clark

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • [SOLVED] Custom checkboxes search & reporting incorrect

This forum was archived on 2017-11-26.