Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.0.1
-
Fix Version/s: 3.0.3
-
Component/s: Core CiviCRM
-
Labels:None
Description
It seems that the created-id on the table civicrm_custom_group is set to the value of the logged in contact creating the custom_group.
This is logical enough, but if that contact is deleted, civicrm_custom_group records are deleted and this cascades to delete the associated fields in civicrm_custom_field.
The actual custom data tables are not deleted, but the recovery would require some careful data surgery if a good backup were not available.
Instead of deleting the civicrm_custom_group record, the field created-id should be set to a null value on deletion of the contact.
Note that the merge duplicate function also mishandles this case.