Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.2.6, 4.3.3, 4.7.23
-
Fix Version/s: 4.4.0
-
Component/s: CiviMember
-
Labels:
-
Versioning Impact:None (no code merged)
-
Documentation Required?:None
-
Funding Source:Needs Funding
Description
When membership is shared through relationships, the sharing does not get updated for new relationships after a merge.
Example: AGH Strategies has a general membership and shares its membership through the employer relationship. Andrew H. is an employee of AGH Strategies. There is a duplicate record for AGH Strategies where Jane H. is an employee. When these two contacts are merged, a membership is not added to Jane H.'s record.
If you go in to edit the main membership the sharing is updated, but its hard to remember to do that.
I found this in 4.2.6 and reproduced it in the 4.3.3 demo.
–
This has regressed and was reproducible in 4.7.23.
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'.
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
- supplements
-
CRM-21151 Membership sharing doesn't work after merge (regression)
- Open