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

Task membership delete does not delete related memberships

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.5
    • Fix Version/s: 4.4.0
    • Component/s: None
    • Labels:
      None

      Description

      I noticed looking at an api test that the behaviour when deleting a membership from a task is different to other forms of deleting (from form, from api)

      From the form or api the code is

      CRM_Member_BAO_Membership::deleteRelatedMemberships($this->_id);
      CRM_Member_BAO_Membership::deleteMembership($this->_id);

      but from the task only

      CRM_Member_BAO_Membership::deleteMembership($this->_id);

      resulting in inherited memberships becoming non-inherited rather than deleted. This seems like a bug but I guess it could be intentional

      Neither of these functions is called many times so if the behaviour should be the same wherever the delete is called from I would strongly suggest that we consolidate the function in the BAO layer as a function called 'del' per the standards http://wiki.civicrm.org/confluence/display/CRM/Database+layer
      and have the api & forms call that rather than having the same code in several places

        Attachments

          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: