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

Limit the number of related memberships

    Details

      Description

      === Please vote or comment on this proposed improvement so I can judge community interest and prioritize accordingly ===

      Very often membership privileges should be granted to only a fixed number of company representatives (ex: our Corporate members can designate 8 company representatives). Yet with CiviCRM all employees of the member organization inherit the membership if configured as such, without limits.

      I am proposing to implement the following changes:

      a) in the 'Create/Edit Membership Type' form, add a 'Max Related Members' field (optional, defaults to 0) right after the 'Relationship Type' field

      b) in the CRM_Member_DAO_Membership::createRelatedMemberships function, check for max_related_members > 0 and if so limit the number of related memberships we create to the above (ie. related memberships would be created for the first x related contacts only)

      c) in the 'Create/Edit Membership' form, add a section only displayed when max_related_members > 0 that lists all related contacts with checkboxes next to each. Clicking the checkbox would create the related membership record, unclicking would delete. A counter (x/m) could also be displayed and updated as checkboxes are changed. I would let the users create more related membership than the value of max_related_memberships to allow for manual overrides.

        Attachments

          Activity

            People

            • Assignee:
              nganivet Nicolas Ganivet
              Reporter:
              nganivet Nicolas Ganivet
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2 days
                2d
                Remaining:
                Remaining Estimate - 2 days
                2d
                Logged:
                Time Spent - Not Specified
                Not Specified