Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.4.4
-
Fix Version/s: 4.4.7
-
Component/s: CiviCRM API, CiviMember, Core CiviCRM
-
Labels:
-
Documentation Required?:None
Description
When:
- a membership type is defined that inherits from an employment relationship with unlimited related members
- an organization has a membership of that type
- you are creating contacts through the API with an employer_id or current_employer_id attribute pointing to the above organization
Then the contact and employment relationships are created fine, but the related memberships are only created for the first contact attached to the organization, but not for subsequent contacts. So after creating several contacts, if you View the organization membership, you will see that only one related membership has been created.
Reproduced on the demo site. This bug does not seem to affect contacts created through the Add Individual screen, but I have not tested other screens that should create a related contact in the DB (ie. add membership on organization, membership creation page, profiles, etc). Since the API uses the BAO in a very straightforward way, it would not surprise me that this bug shows up in other parts of CiviCRM.