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) »
  • Remove smart group user exceptions
Pages: [1]

Author Topic: Remove smart group user exceptions  (Read 1106 times)

kenahoo

  • I post occasionally
  • **
  • Posts: 83
  • Karma: 1
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 7.15
  • MySQL version: 5.1.63
  • PHP version: 5.3.16
Remove smart group user exceptions
September 05, 2010, 07:24:06 pm
Hi,

I've got a smart group called "email recipients" with the criteria "has email address, hasn't opted out of communication, isn't a press release recipient".  I use it for exporting lists to Constant Contact.

Unfortunately one of our people has been checking the "email recipients" checkbox when adding new contacts, so the criteria have been rendered moot.  When showing contacts in the group I can see that some are "added" and some are "smart", how can I turn the "added" ones back to "smart"?

Also, as an aside: it would be helpful to make this more clear in the user-add form, so that people know they're adding an exception to a smart group.

 -Ken

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: Remove smart group user exceptions
September 05, 2010, 09:19:38 pm
Quote from: kenahoo on September 05, 2010, 07:24:06 pm
Unfortunately one of our people has been checking the "email recipients" checkbox when adding new contacts, so the criteria have been rendered moot.  When showing contacts in the group I can see that some are "added" and some are "smart", how can I turn the "added" ones back to "smart"?

I suspect u'll need to do this directly in the DB. check the table, civicrm_group_contact

Quote from: kenahoo on September 05, 2010, 07:24:06 pm
Also, as an aside: it would be helpful to make this more clear in the user-add form, so that people know they're adding an exception to a smart group.

would be great if you can work on this and submit a patch to make this happen. i dont think its 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

kenahoo

  • I post occasionally
  • **
  • Posts: 83
  • Karma: 1
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 7.15
  • MySQL version: 5.1.63
  • PHP version: 5.3.16
Re: Remove smart group user exceptions
September 08, 2010, 04:32:33 pm
Quote from: Donald Lobo on September 05, 2010, 09:19:38 pm
I suspect u'll need to do this directly in the DB. check the table, civicrm_group_contact

Okay, will do.  I assume it just means deleting those rows in the linking table?

Quote from: Donald Lobo on September 05, 2010, 09:19:38 pm
would be great if you can work on this and submit a patch to make this happen. i dont think its too hard

I'll give it a shot.  Thanks.

 -Ken

kenahoo

  • I post occasionally
  • **
  • Posts: 83
  • Karma: 1
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 7.15
  • MySQL version: 5.1.63
  • PHP version: 5.3.16
Re: Remove smart group user exceptions
September 08, 2010, 07:08:01 pm
Quote from: Donald Lobo on September 05, 2010, 09:19:38 pm
I suspect u'll need to do this directly in the DB. check the table, civicrm_group_contact

Done - after verifying that I don't want any of the manual entries, I deleted as follows (pasted here for posterity):

delete from civicrm_group_contact
where group_id in (
 select id from civicrm_group
 where saved_search_id is not null
);

Quote from: Donald Lobo on September 05, 2010, 09:19:38 pm
would be great if you can work on this and submit a patch to make this happen. i dont think its too hard

Attached is a patch.  I did it in sort of "the obvious way", patched against CiviCRM 3.2.2.  Let me know if something should be changed.

Thanks,

 -Ken

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: Remove smart group user exceptions
September 08, 2010, 07:22:06 pm
thanx for the patch

can u please create an issue and attach this patch. we'll include it in the 3.3 release

thanx

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

kenahoo

  • I post occasionally
  • **
  • Posts: 83
  • Karma: 1
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 7.15
  • MySQL version: 5.1.63
  • PHP version: 5.3.16
Re: Remove smart group user exceptions
September 08, 2010, 07:43:26 pm
Quote from: Donald Lobo on September 08, 2010, 07:22:06 pm
can u please create an issue and attach this patch. we'll include it in the 3.3 release

Done - issue is CRM-6800.

 -Ken

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Remove smart group user exceptions

This forum was archived on 2017-11-26.