Inherited membership removed when relationship ended, but gets added back when second relationship has ended
Steps to reproduce:
- Create a membership type that has 2 relationships enabled to inherit (eg. employer of, volunteer)
- Create an organisation with the above membership
- Create an individual
- Create both of the relationships between the individual and the organisation --> inherited relationship is created for individual
- Then edit one of the relationships, and add an end date in the past --> relationship gets inactive which is correct, but the inherited membership gets removed which is incorrect
- Then edit the second relationship, add an end date in the past and save --> relationship gets inactive which is correct, but the inherited membership will be added back which is incorrect as at this point there is no qualifying active relationship
This issue was reported by one of our clients who are using multiple relationship types with their membership types. See video grab from dmaster site https://nimb.ws/cIRBGj