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 contacts permanently from a group
Pages: [1] 2

Author Topic: Remove contacts permanently from a group  (Read 4964 times)

elodie

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 3.3.3
  • CMS version: Drupal 6.17
  • MySQL version: 5.0.77
  • PHP version: 5.2.10
Remove contacts permanently from a group
March 30, 2011, 10:27:20 am
Hi there,
Is there a way to remove contacts permanently from a group?
It is a good option to be able to keep past members as 'removed' from group but sometimes, it was just a mistake and the contact should never have belonged to the group in the first place. I'd like to be able to clean-up these mistakes.
Thanks for your help.
Elodie

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 contacts permanently from a group
March 30, 2011, 06:30:08 pm

I dont think so, but might be a good addition. Your current option is to do this directly in the DB

If you do build a search task to implement this functionality, please share your code so others can benefit

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

LMKWeb

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 1
  • CiviCRM version: 4.2.6
  • CMS version: Joomla 2.5.8
Re: Remove contacts permanently from a group
April 21, 2011, 06:14:44 am
Agreed - if anyone has figured this out I'd love to get the information! We mistakenly added organizations to a group that is supposed to be only for individuals, and I'd rather not show all of those organizations as "removed." Not feeling entirely too comfortable about mucking around in the database, either.

franceslui

  • I’m new here
  • *
  • Posts: 5
  • Karma: 1
  • CiviCRM version: 3.33
Re: Remove contacts permanently from a group
June 01, 2011, 04:31:34 pm
I have implemented this feature to our own website by modifying the file

     /civicrm/CRM/Contact/Task.php

and creating the following two files

    /civicrm/CRM/Contact/Form/Task/RemovePermanentlyFromGroup.php
    /civicrm/templates/CRM/Contact/Form/Task/RemovePermanentlyFromGroup.tpl

See the attachments for their implementation.

If you think they are good, would you please integrate them into the future version of CiviCRM? Thank you.

markimus

  • I post occasionally
  • **
  • Posts: 75
  • Karma: 0
Re: Remove contacts permanently from a group
December 09, 2011, 04:16:20 pm
I tried to implement the attachments but all I got was an error and no button on the delete page? 
Any ideas? 
Alternatively, where does one find this info in the db?   
Success is the ability to go from one failure to another with no loss of enthusiasm.

LMKWeb

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 1
  • CiviCRM version: 4.2.6
  • CMS version: Joomla 2.5.8
Re: Remove contacts permanently from a group
December 12, 2011, 12:10:24 am
I've done this manually before by editing the civicrm_group_contact and civicrm_subscription_history in the MySQL database, but would also love to implement a tool that will do the same. Group history really isn't important to us. The problem we were experiencing was that, when we exported search results listing groups and tags for all members, it also exported removed groups with no differentiation. I couldn't find another solution other than completely deleting the removed groups and the removal subscription history. Would be good if there was a better way.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Remove contacts permanently from a group
December 12, 2011, 12:44:34 am
If you export contacts and choose groups it includes previous groups?

Could you reproduce on demo? If it's the case, it's a bug.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

LMKWeb

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 1
  • CiviCRM version: 4.2.6
  • CMS version: Joomla 2.5.8
Re: Remove contacts permanently from a group
December 12, 2011, 04:48:15 am
Sure I can reproduce - what do you mean by 'on demo', though?

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Remove contacts permanently from a group
December 12, 2011, 04:51:33 am
http://demo.civicrm.org/
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

LMKWeb

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 1
  • CiviCRM version: 4.2.6
  • CMS version: Joomla 2.5.8
Re: Remove contacts permanently from a group
December 12, 2011, 06:28:48 am
OK I was able to duplicate the problem. In the record for Greg Adams (see screenshot) there is one removed group and no current groups. Ran an export with first name, last name, and groups. It pulled out the removed group (see attached CSV).

ETA: This was using the Joomla 1.6 demo - I'm running Joomla 1.7 but the results are identical.

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 contacts permanently from a group
December 12, 2011, 06:42:47 am

someone else reported this over the weekend (lindsey m). she said she'll file an issue and will also try to submit a patch for this issue

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

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 contacts permanently from a group
December 12, 2011, 11:38:36 am

this is now fixed and will be part of 4.1 alpha3

http://issues.civicrm.org/jira/browse/CRM-1872

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

LMKWeb

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 1
  • CiviCRM version: 4.2.6
  • CMS version: Joomla 2.5.8
Re: Remove contacts permanently from a group
December 12, 2011, 11:50:37 am
Great news, thanks!!

franceslui

  • I’m new here
  • *
  • Posts: 5
  • Karma: 1
  • CiviCRM version: 3.33
Re: Remove contacts permanently from a group
December 13, 2011, 12:09:13 pm
Quote from: markimus on December 09, 2011, 04:16:20 pm
I tried to implement the attachments but all I got was an error and no button on the delete page? 
Any ideas? 
Alternatively, where does one find this info in the db?

Hi markimus. My company has used my patches submitted on June 1, 2011 for more than 6 months and does not have any problems. Could you paste the error you got?

Quote from: Donald Lobo on December 12, 2011, 11:38:36 am

this is now fixed and will be part of 4.1 alpha3

http://issues.civicrm.org/jira/browse/CRM-1872

lobo
Hi lobo. The fix in http://issues.civicrm.org/jira/browse/CRM-1872 is not related to the missing feature "Remove contacts permanently from a group" originally discussed in this thread. Could you let me know if this missing feature has been reported in the Issue Tracker? If it has not been, could you consider my patches submitted on June 1, 2011 and integrate them into the future version of CiviCRM? Thank you.
« Last Edit: December 13, 2011, 12:11:53 pm by franceslui »

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 contacts permanently from a group
December 13, 2011, 01:54:25 pm

hey frances:

the conversation kinda moved onto "removed" groups being shown in export to which i responded.

regarding your patch, can you upgrade it so it works in 4.1 and regenerate a patch for that version. Once done, please file an issue and attach the patch and we'll get it into 4.2

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] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Remove contacts permanently from a group

This forum was archived on 2017-11-26.