2

We customised the names of the membership status rules to better suit our needs. For example in the membership status rules screen, 'New' was changed to 'New Members' and 'Current' was changed to 'Paid Up.

On the membership dashboard, the revised names for membership status rules show up correctly. However, when I run membership reports, it's still showing the original names of 'New' and 'Current' in the Membership Status column. I've run Update Membership Statuses but no change in any of the membership reports. Am I missing something here?

Thanking you for your time.

2

You've found a bug! I've confirmed it and reported it here: https://issues.civicrm.org/jira/browse/CRM-19855

Most folks don't change the names of the CiviCRM membership statuses, so this has slipped under the radar for a while. Internally, membership statuses have both a "Name" and a "Label". The vast majority of the time, they're the same. In your case, they're different.

The fix for NEW reports is easy - you literally need to change a single word in the report file. I'll put instructions below.

Since this was so quick, I had intended to write a patch pro-bono to submit to the CiviCRM core team so this could be fixed for everyone - but in testing I found that this change causes the "Membership Status" field to fall off of existing saved reports. Fixing this properly means writing an upgrade script, which I unfortunately don't have pro-bono time for.

You can fix this on your own copy of CiviCRM, but until this is fixed in the "upstream" software, you'll have to fix it every time you upgrade.

To fix this:

  • Find CiviCRM on your web server.
  • From your CiviCRM root, go to the CRM/Report/Form/Member folder.
  • In that folder are the files that control the reports. Open the file that corresponds to the report you want to change with a text editor.
  • in the $fields array, you'll find an entry for Membership Status. It will look something like this:

    'civicrm_membership_status' => array(
      'dao' => 'CRM_Member_DAO_MembershipStatus',
      'alias' => 'mem_status',
      'fields' => array(
        'name' => array(
          'title' => ts('Status'),
          'default' => TRUE,
        ),
      ),
      'filters' => array(
        'sid' => array(
          'name' => 'id',
          'title' => ts('Status'),
          'type' => CRM_Utils_Type::T_INT,
          'operatorType' => CRM_Report_Form::OP_MULTISELECT,
          'options' => CRM_Member_PseudoConstant::membershipStatus(NULL, NULL, 'label'),
        ),
      ),
      'grouping' => 'member-fields',
    ),
    

Take this line:

'name' => array(

Change "name" to read "label":

'label => array(

This will fix your reports! Don't forget to re-add the "Status" field to existing saved reports, and don't forget to make this fix on every upgrade until someone steps forward with time or money to fix this. UPDATE: For the Membership Contribution report, find this section:

  'civicrm_membership_status' => array(
    'dao' => 'CRM_Member_DAO_MembershipStatus',
    'alias' => 'mem_status',
    'fields' => array(
      'membership_status_name' => array(
        'name' => 'name',
        'title' => ts('Membership Status'),
        'default' => TRUE,
      ),  
    ),

change:

'name' => 'name',

to

'name' => 'label',
  • Thank you so much! This has sorted my issue with most of the member reports. For 'Contribution and Memberships Detail' report, the file I'm looking at to edit is ContributionDetail.php - do you know what I need to change here please too? ` 'civicrm_membership_status' => array( 'dao' => 'CRM_Member_DAO_MembershipStatus', 'alias' => 'mem_status', 'fields' => array( 'membership_status_name' => array( 'name' => 'name', 'title' => ts('Membership Status'), 'default' => TRUE, ),` – astroned Jan 11 '17 at 18:10
  • jon does this answer need an edit to make it clear you are refering to Membership Status and not Type – petednz - fuzion Jan 12 '17 at 0:57
  • @petednz-fuzion Done! Though of course you could have done it yourself :) – Jon G - Megaphone Tech Jan 12 '17 at 1:07
  • @astroned I updated my answer to be clearer on the Contribution Membership Detail report. If this solved your problem, please be sure to upvote and mark it as "Solved" - it's an easy way to give back to make this site more helpful to others with similar questions! – Jon G - Megaphone Tech Jan 12 '17 at 1:23
  • i wasn't about to presume i was that correct about the error – petednz - fuzion Jan 12 '17 at 1:23

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.