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

Mailing records are deleted when creator or schedulor contact is deleted or merged

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 2.2.7
    • Fix Version/s: 3.0
    • Component/s: CiviMail
    • Labels:
      None

      Description

      Currently the FOREIGN KEY onDelete attributes for Mailing scheduled_id and created_id are set to CASCADE. This means that Mailings are lost if the creator or schedule are deleted - which is not desirable. Also, if the creator or scheduler are merged with another contact, their mailings are lost.

      1. Fix onDelete attributes for both columns in schema - s/b SET NULL
      2. Include ALTER TABLE for these changes in upgrade SQL
      3. Investigate and fix Merge Contacts logic. If the contact record being merged is referenced in mailing.scheduled_id or created_id - the foreign key s/b updated to the merged-to contact's ID.

        Attachments

          Activity

            People

            • Assignee:
              neha.saraph Neha Kulkarni
              Reporter:
              dgg David Greenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: