Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-15593

Prevent contributions being imported when nominated contact is_deleted

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.5
    • Fix Version/s: 4.5.4
    • Component/s: CiviContribute
    • Labels:
    • Documentation Required?:
      User and Admin Doc

      Description

      See http://forum.civicrm.org/index.php/topic,30583.0.html

      As Lobo requested, I investigated what change was needed to implement this and give the user an error. No doubt Lobo wanted me to go further and investigate other options. I haven't done this because importing contributions and attaching them to a deleted contact is IMO deadly ...

      1. It is not unusual for a donor record to have a duplicate created, for the duplicates to be merged, and for the import file to refer to the deleted record. This means the income is not associated correctly with a donor. Recovery in this case is tedious: undelete the deleted contact and re-merge.

      2. The CiviContribute reports do not include contributions for deleted contacts for the obvious reason that such contributions are themselves deleted.

      My proposed solution (PR forthcoming) is to throw an error if the contact Id provided indicates a deleted contact ("Invalid Contact ID: contact_id 12345 is a soft-deleted contact.").

      I suggest that importing contributions to a deleted contact is an edge case, and can be achieved by un-deleting the contacts, importing contributions and re-deleting them. The case I've outlined above is the main case and should be supported by the code.

      The import documentation should be updated to warn that importing contributions for a deleted contact will raise an error.

        Attachments

          Activity

            People

            • Assignee:
              yashodha Yashodha Chaku
              Reporter:
              ken Ken West
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: