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

Membership sharing doesn't work after merge (regression)

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.7.23
    • Fix Version/s: None
    • Component/s: CiviMember
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      This is a regression of CRM-12695.

      When membership is shared through relationships, the sharing does not get updated for new relationships after a merge.

      Steps to recreate:

      Create an organisation: 'Membersonly Organisation'
      Create another organisation: 'Main organisation'
      Create another organisation: 'Duplicate organisation'

      Create contacts:
      'Employee one'
      'Employee two'
      'Employee three'
      'Employee four'

      Create a new membership type:
      Name: TEST Membership cascades
      Org: Membersonly organisation
      Ensure that 'relationship type' is set to 'Employer of' (so the membership should cascade to employees)

      Add membership to main org:
      Add a 'TEST membership cascades' to 'Main organisation'

      Add employment relationships:
      Employee one > Main organisation
      Employee two > Main organisation
      Employee three > Duplicate organisation
      Employee four > Duplicate organisation

      Merge the 'Duplicate organisation' into the 'Main organisation' (move related relationship)

      Expected result:
      'Main organisation' has all four employees, and all employees have the 'TEST membership cascades' on their records

      Actual result:
      'Main organisation' has all four employees, but only 'Employee one' and 'Employee four' have the membership? It has been lost from 'Employee two' and was not added to 'Employee three'.

      Solution:

      Fix and implement tests to prevent future regression. Rather than a webtest, lets have a unit test for this as part of the merging code - we have unit tests on that now for other parts of functionality.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                john John K.
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: