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

Contact's second membership fails to inherit

    Details

    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      Summary

      Issue occurs when there are two membership types, each having the same relationship type configured, with different membership organisations so that a contact can have memberships of both types.

      If a contact has memberships of both types and a relationship of the relevant type, the related contact should inherit both memberships. However, in some scenarios, this does not happen and the related contact only inherits one of the memberships.

      In other scenarios, existing inherited memberships can be deleted.

      Steps to replicate inheritance failure

      1. Set up two membership types, each having the same relationship type configured (e.g. Spouse of), with different membership organisations.
      2. Set up a price set with a checkbox field allowing both membership types to be selected.
      3. Set up a contribution page using this price set.
      4. Find or create a pair of contacts with the relevant relationship (e.g. in standard test data, Rebekah Ivanov-Roberts & Jed Roberts).
      5. Use the contribution page to create memberships of both types for one contact, which the other should inherit (e.g. for Rebekah Ivanov-Roberts).

      Expected outcome:
      The related contact (e.g. Jed Roberts) should inherit both memberships.

      Actual outcome:
      The related contact only inherits one of the memberships.

      Issue also occurs when the memberships are created from the back end using the price set.

      Steps to replicate deletion of inherited membership

      Not yet confirmed but it's suspected this may happen when the membership update job runs and updates one of a contact's two memberships, e.g. where the end dates are different.

      Affected Versions

      Known to affect 4.6.16 and 4.6.24 .

      Does not affect 4.7.14 . I suspect the fix for CRM-17723 may be avoiding the bug in 4.7 . However CRM-17723 does not occur in 4.6.24 and I don't think the patch from CRM-17723 can straightforwardly be backported to 4.6, as the underlying code has changed substantially. So I think an alternative fix is needed for 4.6 and I devised one before discovering CRM-17723 .

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                davej Dave Jenkins
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: