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

CLONE -Delete Contacts - Associated notes are not deleted for contact when contact is deleted.

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      I'm having to reimport and delete a few times to get everything right. I noticed that the notes associated with a particular contact id are not getting deleted when I use the delete contacts through the CiviCRM menu. Normally, this wouldn't be a problem, but I'm resetting the auto-increment when I delete everything to start over for this import. Thus, what ends up happening is that I end up with previous notes mis-matched to the new contact id.

      When you delete a contact, all the notes associated with that contact id should be deleted, or at least an additional option provided to delete associated notes for the contact. As a work around, I'm deleting the notes manually when I restart the import. For most users, this won't be a problem as the auto-increment will prevent old notes from being associated with new contact id's. It just means that the civicrm_notes table will grow and will contain contact_id's that no longer existing.

      Solution:

      Provide a delete option for notes associated with current contact_id's or just perform a cascade delete for civicrm_notes for notes associated with a particular contact_id.

      I was testing in CiviCRM 3.1.beta3

        Attachments

        1. civicrm_issue_note.txt
          0.6 kB
          Erik Hommel
        2. screenshot-1.jpg
          255 kB
          Erik Hommel
        3. screenshot-2.jpg
          134 kB
          Erik Hommel

          Activity

            People

            • Assignee:
              kurund Kurund Jalmi
              Reporter:
              erikhommel Erik Hommel
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: