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 (Moderator: Dave Greenberg) »
  • Include / Exclude custom Search does not work properly
Pages: [1]

Author Topic: Include / Exclude custom Search does not work properly  (Read 1458 times)

Fabian_SYSTOPIA

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 3
  • CiviCRM version: 4.3.x, 4.4.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.4.10
  • PHP version: 5.4.10
Include / Exclude custom Search does not work properly
October 16, 2013, 03:09:09 am
Dear all,

the Include / Exclude custom Search does not work properly when you include a Smart Group that has "OR" as a Search Operator.

I could reproduce the error on the demo installation:
  • go to advanced search, choose "OR" as search operator
  • in "Complete OR Partial Name" enter "a", under "Contribution|Contribution Date" select "this year"
  • click search and create a smart group from the search results
  • go to "custom Searches|Include / Exclude Search"
  • include the dynamic group you just created, hit search

Result: The result will use the search criteria from the smart group but ignores the "OR" operator and uses the "AND" operator instead. This means, You will only get contact that fullfill all the search criteria - in our case all contacts that have "a" in their name and donated this year.

Since this is a Custom Search, I am not sure, how to proceed. Should I post a bug report? Should I contact the contributor of the custom search (i think it's Erik Hommel)? Please let me know, if you need more information

Looking forward to hear from you soon
Fabian

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: Include / Exclude custom Search does not work properly
October 16, 2013, 07:10:22 am

what happens when you just list the contacts (from the manage group screen?) of the smart search? or include the group in advanced search?

does it work right there?

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

Fabian_SYSTOPIA

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 3
  • CiviCRM version: 4.3.x, 4.4.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.4.10
  • PHP version: 5.4.10
Re: Include / Exclude custom Search does not work properly
October 16, 2013, 08:05:39 am
Hi Lobo,

thanks for the fast reply.
Yes, from the manage group screen everything works fine.

Regards
Fabian

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: Include / Exclude custom Search does not work properly
October 16, 2013, 08:41:29 am

ok, so this seems like a include/exclude group issue. If i had to guess, that custom search was written before the 'OR' operator was introduced in civi search.

I think that search should be modified to use the smart group cache and hence be a lot more efficient rather than redoing the query every time (there will be sporadic cache stale-ness, but fairly minor IMO)

wanna take a crack at it? we can help out on irc, might not be too hard :)

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

Fabian_SYSTOPIA

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 3
  • CiviCRM version: 4.3.x, 4.4.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.4.10
  • PHP version: 5.4.10
Re: Include / Exclude custom Search does not work properly
October 16, 2013, 09:10:00 am
Hi Lobo,

I would love to help but I have no developing skills whatsoever and would not even know where to start  :-\

Please let me know if I can help in any other way.

Greetings from Bonn
Fabian

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: Include / Exclude custom Search does not work properly
October 16, 2013, 10:03:50 am

any chance bjorn or someone else from systopia can take a look at this?

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

Fabian_SYSTOPIA

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 3
  • CiviCRM version: 4.3.x, 4.4.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.4.10
  • PHP version: 5.4.10
Re: Include / Exclude custom Search does not work properly
October 16, 2013, 10:10:05 am
Björn wont be able to do it in the near future - we have a huge project with an upcoming system switch that will need all his attention in the next two or three weeks. He may have a look at it afterwards if nobody else can have a look at it meanwhile...

By the way - should I post a bug report?

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: Include / Exclude custom Search does not work properly
October 16, 2013, 10:28:46 am

yes, do post a bug report

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

Fabian_SYSTOPIA

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 3
  • CiviCRM version: 4.3.x, 4.4.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.4.10
  • PHP version: 5.4.10
Re: Include / Exclude custom Search does not work properly
October 16, 2013, 10:36:54 am
Bug Report:
http://issues.civicrm.org/jira/browse/CRM-13606


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Include / Exclude custom Search does not work properly

This forum was archived on 2017-11-26.