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) »
  • Joining Smart Group together
Pages: [1]

Author Topic: Joining Smart Group together  (Read 1141 times)

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Joining Smart Group together
August 27, 2007, 03:19:05 pm
Hi - if we make several Smart Groups and then join them together to be a Group (or a Smart Group) does the 'smart' function of the original Smart Groups still function.
I wanted to create a Smart Group of all our office holders. The office holders are based on relationships. So i have set up a Relationship for 'Convenors' and another one for 'Treasurers' etc.
I have created Smart Groups based on the Relationship so that when someone ceases to be a Treasurer and we delete that Relationship from their record they will cease to show in the eg Treasurers Group. So far so good.
Then I wanted to create a Smart Group of all 'Office Holders' so I used Adv Search to get my Treasurers and added them to a new Smart Group (OfficeHOlders), then when I found Convenors and went to add them, my SmartGroup was being refered to as a Group. And when I had added in several more subgroups eg COnvenors, MembSecs, and then tested to see if the 'smart' function worked fine I found that the Group still contained someone that I had removed the Relationship from. Clear?
So am I doing it wrong, or does 'smart' not flow through when you start joining groups together?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

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: Joining Smart Group together
August 27, 2007, 03:55:35 pm

Pete:

Theorotically this should work. If not, it is a bug and if you can reproduce this on a small scale on demo, please file an issue. However, i suspect we will not get to it till the 2.1 version of CiviCRM when we make an attempt at improving and fixing search

Practically, I dont think doing the below is advisable right now. MySQL is incredibly inefficient at sub-select optimization (http://bugs.mysql.com/bug.php?id=2565) and we use a fair amount of subselects with smart groups etc. I think in 2.x we will probably avoid it and create in-memory temp tables for improved performance. To debug this, i would advise you (or chris) look at the mysql query log and see the queries being generated. Note that the queries are complex enough to make my head hurt a lot!

Your other less attractive alternative, is to create a static group form all officeholders and populate it via a cron script on a daily basis to get around the above. Kinda sucky, but i suspect much better

lobo

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

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Joining Smart Group together
August 27, 2007, 06:35:09 pm
Sorted - think it must have something to do with which end of the Relationship I was working from
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Joining Smart Group together

This forum was archived on 2017-11-26.