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 CiviContribute (Moderator: Donald Lobo) »
  • Contribution Data Not Deleted
Pages: [1]

Author Topic: Contribution Data Not Deleted  (Read 1274 times)

midsouthpeace

  • I’m new here
  • *
  • Posts: 27
  • Karma: 1
Contribution Data Not Deleted
December 02, 2010, 04:04:43 pm
I am running CiviCRM 3.2 on Drupal 6 loaded on a OSX snowleopard server. I imported contribution data using an external identifier to link with the correct contact.

It took several attempts to get data loaded correctly, so I deleted all of the contribution data. When I re-loaded the contribution data I noticed that the old data (though it does not show up in contribution searches) is showing up in donation totals, # of contributions...etc.

Does anyone know how I permanently delete the other data?

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: Contribution Data Not Deleted
December 03, 2010, 04:42:39 am
There are no trash/partial delete stage for contributions if you delete them the get deleted permanently.
( we do support trash only for contacts ) 

I think there are two cases here :
 
a. there might be some contribution data was not deleted.
b. there might be bug/error in donation total calculation.

lets confirm first step :

which process you followed to delete contribution data ?

you could get all contributions for affected contacts from contribution search
1. Do the contribution search with only contact as a search criteria.
2. Repeat the search with additional search critera as 'Find Test Contributions?' = true.

or simply you could fire a query on database
"select id from civicrm_contribution where contact_id = ... "

let us know your findings.

thanks

kiran
You Are Designed To Choose... Defined By Choice.

midsouthpeace

  • I’m new here
  • *
  • Posts: 27
  • Karma: 1
Re: Contribution Data Not Deleted
December 03, 2010, 07:50:30 am
Contributions were deleted by searching for all contributions and using the select all and delete contribution function.

Tried all the search functions and it turns up no contributions, but in the contribution dashboard $$ from previous years still shows in the graphs.

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: Contribution Data Not Deleted
December 06, 2010, 02:39:44 am
I suspect there are some contributions which are related to deleted contacts.

Could u please go to Search -> Advanced Search -> Search in Trash (deleted contacts) = true and search.

In case you find some contacts and you don't need these partially deleted contacts in future, you can remove them permanently from the system, which will delete all related contributions ( To remove permanently : select - 'Delete Permanently' from 'actions' drop down )

At this moment system has deleted all contributions those are related to deleted contacts.

So you could confirm the contribution summary for these suspected issue.

Also we should not include contributions of deleted contact in contribution summary statistics.

Filed issue is here : http://issues.civicrm.org/jira/browse/CRM-7174

thanks,

kiran
You Are Designed To Choose... Defined By Choice.

jmkaep

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 1
Re: Contribution Data Not Deleted
December 27, 2010, 08:09:02 am
Can they be deleted manually from the contributions database table?

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: Contribution Data Not Deleted
December 27, 2010, 09:05:58 pm
yep, you could delete from database, if you are no more interested in those.

might be following query serves the needful.

Code: [Select]
      DELETE  contrib.*
        FROM  civicrm_contribution contrib
INNER JOIN  civicrm_contact contact ON ( contrib.contact_id = contact.id )
      WHERE  contact.is_deleted = 1;

Caveat : On restoring those trash / soft deleted contacts, contribution data will not been recovered.

kiran
You Are Designed To Choose... Defined By Choice.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Contribution Data Not Deleted

This forum was archived on 2017-11-26.