Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Cannot Reproduce
-
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