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) »
  • Smart group membership hidden??
Pages: [1]

Author Topic: Smart group membership hidden??  (Read 888 times)

tgramil

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
Smart group membership hidden??
November 10, 2009, 01:15:29 pm
I am a beginner with civiCRM, and am not sure if the behavior I see is intended or not.

I have set up a handful of individual contacts to 'play' with, and have set a custom data field
called Participation:Role with radio choices of Rower, parent, coach.  It is a required registration field.
 (I have chosen not to use tags for this in anticipation of 3.1's expected ability to have 'flavors' of individuals)

I then set up a smart group called Current Rowers, which searches for the rower selection in this field.
The group exists, and if I inspect the membership (as administrator) it correctly lists the appropriate contacts.

The behavior I am confused by is that the groups tab for any of the contacts who are rowers  shows that they
are not in the 'Current Rowers' group.   If that contact adds itself by hand to the group, it then shows up in the tab
as a member of Current Rowers".  Furthermore, it can then look at the members of Current rowers, where it  sees
all the other 'rowers'  even though the other rowers cannot see that they are members by inspecting their own groups tab.

I am wondering if this is how things ought to work, if its possible that I have some drupal permission wrong (I looked hard
at this...), or whether  I have missed something in how I might have configured this.  I would have expected that a contact
 who was a member of a smart group would see that they were a member in their groups tabs.

Thanks in advance,   Tom G.

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: Smart group membership hidden??
November 10, 2009, 02:13:20 pm

We dont expose smart group membership in the group tabs

smart groups == contacts (from a query) + contacts (added individually)

the behavior u see below is due to the latter, i.e. the contact was added specifically to the group

It would be potentially very expensive to list all the smart groups a contact is in (since u'll need to execute all the queries). however in recent versions, we've started "caching" the members of the smart group and you can potentially use that cache (but that is not necessarily accurate)

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

tgramil

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
Re: Smart group membership hidden??
November 11, 2009, 10:51:37 am
Thanks for the rapid response, I can see how it makes sense for civicrm to behave this way,
especially from the point of view of having many more contacts than our few hundred.

Another, follow up beginner question -- the prospect of using the cache of the smartgroups
sounds inviting.  I have looked around a bit, though unsuccesfully, for info about
how I might go about this.  Is this something I will have to code to get access to,
or is it already wired in somewhere? Any direction as to where to look for more info
would be a big help.

Anyway, this is an incredible program, and I am equally impressed by your assistance!

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: Smart group membership hidden??
November 11, 2009, 11:12:18 am

you will need to write code for this, the smart groups are cached in: civicrm_group_contact_cache

since its a cache, data out there might not be completely accurate. the cache is also filled on a as-needed basis

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

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

This forum was archived on 2017-11-26.