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

When custom field groups are created, creator id is foreign key subject to cascade delete, creating risk of data loss

    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.

        Attachments

          Activity

            People

            • Assignee:
              rajan Rajan P Mayekar
              Reporter:
              willbrownsberger Will Brownsberger
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: