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) »
  • Is there a way to move an contribution from one contact to another without merge
Pages: [1]

Author Topic: Is there a way to move an contribution from one contact to another without merge  (Read 2580 times)

rajm

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 4.1.beta1
  • CMS version: drupal 6.6
  • MySQL version: 5.1.59
  • PHP version: 5.2.17
Is there a way to move an contribution from one contact to another without merge
January 05, 2012, 09:26:53 pm
Hi!

I have a need to move contributions from one donor(contact) to another without merging contacts.  Is there a way to do it? I have been trying to find documentation but so far have not found it.

Thanks for your help.
Raj

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Is there a way to move an contribution from one contact to another without merge
January 06, 2012, 04:12:23 am
There is no way via the web interface AFAIK, but you could, technically, alter the reference manually in the database. You would need a bit of understanding of MySQL for that however.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

rajm

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 4.1.beta1
  • CMS version: drupal 6.6
  • MySQL version: 5.1.59
  • PHP version: 5.2.17
Re: Is there a way to move an contribution from one contact to another without merge
January 06, 2012, 06:56:31 am
Does a database schema document exists somewhere to understand the relationships in the tables for contribution and custom contribution fields before attempting an update in the database so that all the required fields of a contribution record are moved to another contact id.  If so, could you please point me to it.  Thanks.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Is there a way to move an contribution from one contact to another without merge
January 06, 2012, 07:52:48 am
I do this all the time and never had a problem with it. All custom and related fields go off the contribution id, not the contact ID, so no issue there. All you have to do is:

-Fire up PHPmyAdmin
-Search the civicrm_contribution table for the records in question
-Change the contact ID from one to the other

If you have a lot of them to move from one contact to another, you could also just fire off a single query:

UPDATE `civicrm_contribution` SET contact_id = 123 WHERE contact_id = 456

CAVEAT: I assumed that it was just a straight contribution you were talking about. But if it's a contribution for an event, membership, or purchase, then it's not quite so simple - you'd need to update those records as well.
« Last Edit: January 06, 2012, 03:04:04 pm by colemanw »
Try asking your question on the new CiviCRM help site.

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: Is there a way to move an contribution from one contact to another without merge
January 06, 2012, 11:06:02 am

there is a 3.3.6 ERD here:

http://wiki.civicrm.org/confluence/pages/viewpageattachments.action?pageId=38994623&metadataLink=true

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

rajm

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 4.1.beta1
  • CMS version: drupal 6.6
  • MySQL version: 5.1.59
  • PHP version: 5.2.17
Re: Is there a way to move an contribution from one contact to another without merge
January 06, 2012, 04:35:27 pm
I moved the contribution records manually and did move all the associated records like activities, etc. though it was time consuming.  There was  someone else asking for the same feature in the forum (something like a button). Especially those who used GIFTWORKS in the past are used to this feature. 

I am new here and do not know how difficult it would be for a future release.

Thanks for your help.

rubofvil

  • I’m new here
  • *
  • Posts: 23
  • Karma: 1
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 7
  • MySQL version: mysql 5.1
  • PHP version: php 5.2
Re: Is there a way to move an contribution from one contact to another without merge
February 18, 2014, 04:34:46 am
I making a extension to migrate the contribution to another contact.
I know that it's not too much correct with the structure from CiviCRM, but is a requirement.

Following the thread of the conversation. With these verifications the information in CiviCRM is consistent(or correct), or i missing something?

  • civicrm_contribution_product.contribution_id -> civicrm_contribution.id   it's not necessary verify
  • civicrm_contribution_soft.contribution_id -> civicrm_contribution.id   it's not necessary verify
  • civicrm_membership_payment.contribution_id -> civicrm_contribution.id   (contact without memberships)
  • civicrm_participant_payment.contribution_id -> civicrm_contribution.id   (contact without events)
  • civicrm_pledge_payment.contribution_id -> civicrm_contribution.id   (contact without pledges)
  • Change in the activities (With component CiviContribute) the target_contact_id.

Thanks!

Detlev

  • I post occasionally
  • **
  • Posts: 68
  • Karma: 2
    • Software für Engagierte e.V.
  • CiviCRM version: 4.5
  • CMS version: Drupal
Re: Is there a way to move an contribution from one contact to another without merge
February 21, 2014, 12:09:09 am
Moving contributions from one contact to another, definitely is a common business requirement!

Quote
I making a extension to migrate the contribution to another contact.

That sounds great - many of us will take use of that extension. It would be very helpful, if you would make that extension available as a generic extension within the extension directory for download.

Some remarks regarding the required functionality:

  • It should be possible to move a contribution to another contact type (e.g. from an individual to an organization/a household.)
  • Access control: Moving contributions should require the access control "delete contributions" (or, alternatively, there could be a new permission like "CiviContribute: move in CiviContribute"
  • Also, there should be a mechanism, that prevents those contributions to be changed, that are already confirmed with a formal tax receipt...

Cheers,
Detlev


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Is there a way to move an contribution from one contact to another without merge

This forum was archived on 2017-11-26.