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) »
  • Change to Smart Groups
Pages: [1]

Author Topic: Change to Smart Groups  (Read 2310 times)

ldee

  • Guest
Change to Smart Groups
October 29, 2009, 09:25:51 am
We have noticed with Smart Groups that it is only when a new record onto the database with the criteria that we have set the smart group up with, will the smart group update.

Would it not be a good idea to have the option for CiviCRM to check the database for any records with those same criteria and add them to the smart group?

We keep track of quite a lot of relationships, but the records may already be on the database before the relationship is added and we would love to make use of Smart Groups.

Thoughts?

Lianne Dee
Alpha International

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Change to Smart Groups
October 29, 2009, 09:40:34 am
Hi Lianne - We do "cache" the Smart Group members in order to prevent running the query every time a page loads. However the "existing records" which match a Smart Group query should get put in the cache when the Smart Group is created or modified AND the cache should be updated appropriately when a record is changed such that it now matches the query.

It's possible that there are some record  update operations that are not appropriately updating the cache. In order for us to track this down we'll need you to:
1. Describe and / or provide screen shot of the smart group search criteria
2. List the steps you've taken to produce the situation where a record SHOULD be in the smart group but isn't showing up there.

(If you can recreate this on the public demo and list the steps - that's ideal.)
Protect your investment in CiviCRM by  becoming a Member!

ldee

  • Guest
Re: Change to Smart Groups
November 05, 2009, 02:31:00 am
I wonder if it would be useful to have some additional functionality whereby you could ask the database to search through existing records that have been given the criteria of the smart group and have the smart group updated?

I don't think the database should automatically do this when creating a smart group, but I think having this additional option would make these groups even smarter!

Regards,

Lianne Dee
Alpha International

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Change to Smart Groups
November 05, 2009, 09:43:40 am
Quote from: ldee on November 05, 2009, 02:31:00 am
I wonder if it would be useful to have some additional functionality whereby you could ask the database to search through existing records that have been given the criteria of the smart group and have the smart group updated?

This should be happening now. As I mentioned above, if you can describe in detail a set of steps where it does NOT happen - and you or we can reproduce it , then that's a bug to be fixed.
Protect your investment in CiviCRM by  becoming a Member!

sykong

  • Guest
Re: Change to Smart Groups
December 10, 2009, 12:50:56 am
In my situation, I have a smart group of all event participants (search criteria is Participant Status IN Registered or Cancelled or Pending from pay later... etc... bascially all the statuses)

New participants are not automatically added to the smart group. I can duplicate it on my server, but can't duplicate it on the demo...

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Change to Smart Groups
December 10, 2009, 01:24:48 pm
I just ran a quick test on my local sandbox, and updating a participant status via Edit Participant definitely added them to a smart group which was based on that participant status (I created a smart group for all "Cancelled" participants).

If you tried to recreate using exact same steps on public demo and it didn't recreate, then possibly this is something fixed in latest stable release (3.0.3) - altho I didn't see an issue on that in the 3.0.3 issue queue :-(

Other suggestion is to examine what's happening "under the covers" a bit on your site. Smart group members are cached in civicrm_group_contact_cache. You can empty that table and then force it to re-populate by editing a Participant record and saving. You may need to run your advanced search again after that to make sure the cache is reloaded. So you can monitor what's happening in that table based on actions taken (e.g. add new participant) - and possibly uncover an insert that we're not trapping properly for addition to cache ??
Protect your investment in CiviCRM by  becoming a Member!

sykong

  • Guest
Re: Change to Smart Groups
December 10, 2009, 04:10:41 pm
Yes, it is probably the cache.

"Edit Smart Group Search Criteria" will show all the members. What I normally do is just update smart group from there... Will see if I can find where the issue is...

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Change to Smart Groups

This forum was archived on 2017-11-26.