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

Improve DB integrity on financial_account.parent_id

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 4.7.15
    • Fix Version/s: None
    • Component/s: Accounting Integration
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      Yes

      Description

      Create a contact. Create a financial account with that contact as the parent_id. Soft delete the contact - note that there are no warning or error messages.

      Solution
      An attempt to soft-delete a contact referenced from a record in financial_account table should fail with message like 'One or more Financial Accounts is owned by the contact you are trying to delete. Please remove such references before deleting this contact.' If an attempt is about to be made to delete this kind of contact as part of merge/delete operation, it should also fail with the same message.

        Attachments

          Activity

            People

            • Assignee:
              pradeep.nayak Pradeep Nayak
              Reporter:
              joemurray Joe Murray
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 2 hours, 30 minutes
                2h 30m
                Remaining:
                Remaining Estimate - 2 hours, 30 minutes
                2h 30m
                Logged:
                Time Spent - Not Specified
                Not Specified