The use case I have is as follows:
An organization has multiple chapters, and it's important to record which chapter the person is in. For a variety of good reasons (e.g. ACLs), chapters are represented by adding the contact to a group. When adding a contact to a group, a hook_post
in an extension fires, and fills out a custom field with the name of the chapter they're in.
However, the chapter of a member is determined by location, so we want to move to using smart groups that can automatically classify contacts into chapters. However, when a user is added via Smart Group, the hook doesn't fire, and the custom field's not filled in.
Any suggestions? I'm open to reorganizing the data - but the users would really like to have folks automatically classified into chapters by geography (zip code ranges, etc.) and so I think this requires that chapters be set by smart group. It's OK if an answer requires coding, I'm civix-savvy.
This site is using CiviCRM 4.4.16, Wordpress 4.2.2.