5

Consider this:

  1. Wilma becomes a member on 1 Jan 2016, but does not renew at the end of the year.

  2. (so throughout 2017, 2018, Wilma is not a member)

  3. Wilma joins again in Jan 2019.

According to the documentation, CiviMember will find the original membership and change the start date to 1 Jan 2019 and the end date to 31 Dec 2019, and set the status to live (or new etc.)

This now looks like Wilma has been a member since 1 Jan 2016, but that's not the case.

Is there a way to have CiviMember create a new membership and leave old expired ones (i.e. those with "member: No" configured for their membership status) as-was?

There's a similar question that seems to be focussed on a WordPress/Caldera forms environment, but I'm asking about CiviCRM's native forms, hence the separate question.

4

I do not believe this is possible as of CiviCRM 5.4 at least.

The logic is coded in civicrm/CRM/Member/BAO/Membership.php so the only way to override this is with a core override file, which is a maintenance headache since it will need re-working on ever upgrade.

This patch seems to make it work as I think it should:

diff --git a/civicrm/CRM/Member/BAO/Membership.php b/all/modules/civicrm/CRM/Member/BAO/Membership.php
index 18269014..7713ee9e 100644
--- a/civicrm/CRM/Member/BAO/Membership.php
+++ b/civicrm/CRM/Member/BAO/Membership.php
@@ -1860,6 +1860,14 @@ INNER JOIN  civicrm_contact contact ON ( contact.id = membership.contact_id AND
     $currentMembership = CRM_Member_BAO_Membership::getContactMembership($contactID, $membershipTypeID,
       $is_test, $membershipID, TRUE
     );
+
+    // -------Begin patch to create new memberships if last one had expired-------
+    if ($currentMembership && !$currentMembership['is_current_member']) {
+      // Force a new membership.
+      $currentMembership = NULL;
+    }
+    // -------End patch to create new memberships if last one had expired-------
+
     if ($currentMembership) {
       $renewalMode = TRUE;

  • 1
    If you leave the old membership expired and create a new one, does it open up potential false positives on searches for people with expired memberships? – Laryn - CEDC.org Jan 25 at 15:41
  • Yes it does. It also means that if I search 'Current Member: no' then there is a false positive because of the expired membership. I think this is the fault of the membership search though. I think the data should accurately reflect the truth, and I think the search should enable interpretation of that data back to real world truth. I don't think we should bend the data to fit the interpretation. But yes, this is important to understand and ultimately iron out! – artfulrobot Jan 28 at 9:01
  • Thank you so much for this! Far simpler than the other workarounds I'd seen. I am definitely happy to manually override this file to get this feature. – Andrew West Mar 6 at 18:17
0

Not a direct answer but you could create a different membership type each year and disable the previous year's type. It sounds like you'd want these reported separately in reports anyway?

  • Clever! But I think that will interfere with the people who genuinely do renew their memberships each year, for whom we do want to see a continual membership. – artfulrobot Jan 22 at 18:10
  • Or at the end of the year add a tag to people who were members that year? (e.g. 2018 member, 2019 member, etc.) – Laryn - CEDC.org Jan 25 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.