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

Changing membership type deletes previous contribution line-items

    Details

    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      Seems odd that no-one has reported this, but working on CRM-15861 and go through a series of tests, noticed this scary bit in CRM_Member_BAO_Membership.create, ~ line 336:

          //do cleanup line  items if membership edit the Membership type.
          if (empty($ids['contribution']) && !empty($ids['membership'])) {
            CRM_Price_BAO_LineItem::deleteLineItems($ids['membership'], 'civicrm_membership');
          }
      

      This seems particularly bad. Why would changing a membership type result in the deletion of any contribution line-items made in previous years?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              litespeedmarc Marc Brazeau
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: