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

CRM_Member_BAO_Membership::getContactMembership does not return latest membership

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 2.2.3
    • Fix Version/s: 2.2.6
    • Component/s: CiviMember
    • Labels:
      None

      Description

      CRM_Member_BAO_Membership::getContactMembership does not return latest membership record.

      This can cause problems when an organisation with two membership records is called. The method can mistakenly return that they are not a member ([is_current_member] => 0) if it looks at an older record which has expired.

      The bug is fixed by adding the following at line 649 in CRM/Member/BAO/Membership.php

      $dao->orderBy('start_date DESC');

        Attachments

          Activity

            People

            • Assignee:
              shailesh Shailesh Lende
              Reporter:
              michaelmcandrew Michael McAndrew
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 10 minutes
                10m
                Remaining:
                Remaining Estimate - 10 minutes
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified