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

CRM-8075 contributions deleted when modifying overdue pledge

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.6, 4.5
    • Fix Version/s: 4.5
    • Component/s: None
    • Labels:
      None
    • Documentation Required?:
      None

      Description

      Symptoms like CRM-8075

      Data set up is an overdue pledge with pledge payments being a mixture of completed & pending. If you then go to edit that pledge the existing payments & contributions are deleted.

      This is mitigated by the fact that data should not be in that state - I did replicate getting it into that state in 4.5 through the UI but couldn't re-replicate. On real sites it is likely that the use of the api helps to get into this state.

      @joemurray - the flow is that when a 'overdue' pledge is edited ALL pledge payments are deleted. The flow on from this is that the contributions are deleted by the FK.

      I think this

      https://github.com/civicrm/civicrm-core/blob/master/CRM/Pledge/BAO/PledgePayment.php#L278

      should go. I'm not even sure we should delete pending contributions - thoughts?

      Further I don't think the deleting & recreating of the pledge_payments makes sense - I guess if was a quick code solution at the time.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dgg David Greenberg
                Reporter:
                eileen Eileen McNaughton
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: