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

Memberships by relationship persist even after relationship has changed

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.0
    • Fix Version/s: 4.7
    • Component/s: None
    • Labels:
      None
    • Documentation Required?:
      None
    • Funding Source:
      Core Team Funds

      Description

      When the relationship type of a relationship is changed, check if the contact has membership(s) inherited due to that relationship. If the membership inheritance is no longer valid based on the updated relationship type:

      • set the membership status to expired
      • insert activity record - activity type = Change Membership Status, subject = "Inherited membership $membershipType status changed to Expired" details = "Membership expired due to change in relationship between $thisContactDisplayName and $membershipOwnerDisplayName."
      • postProcess should display a status message to the user:
        "Inherited membership $membershipType status was changed to Expired due to the change in relationship type."

      — Original post ----
      Did this one on the 4.3 sandbox. Some users will edit, rather than delete, relationships.

      1. Create a membership with 'by relationship'
      2. Create a related contact that gains that membership (such as an employee of or household member of)
      3. Note that the membership (by relationship) exists for the contact
      4. Edit the relationship, change it to a different type (i.e. change employee to volunteer)
      5. The membership by relationship STILL exists
      6. Running the 'update membership' scheduled job seems to have no effect.

      The only way to remove the membership by relationship seems to be by deleting the relationship entirely.

        Attachments

          Activity

            People

            • Assignee:
              dgg David Greenberg
              Reporter:
              stoob Stoob
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: