CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Search/report on who Joined, Renewed, Graced, Expired in 'last week'
Pages: [1]

Author Topic: Search/report on who Joined, Renewed, Graced, Expired in 'last week'  (Read 804 times)

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Search/report on who Joined, Renewed, Graced, Expired in 'last week'
April 07, 2010, 03:14:56 am
Hi - hoping someone can suggest a better solution.

To come up with a list of 'who joined, renewed, resigned, expired' etc in the last week/month etc it seems like we are going to have to tie several searches together since the 'change of status' doesn't seem to be easy to grab from the UI.

- date of renewal can be worked out by doing a search based on 'end date' and working backwards
- date of joined can be got from the 'start' or 'join' dates
- resigned?

IF we work on doing this via Report then we are going to need to grab a whole load of other data including addresses, etc

Does a Custom Search seem to fit the case better?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Search/report on who Joined, Renewed, Graced, Expired in 'last week'
April 07, 2010, 06:39:27 am

a Report seems to be a better match for the below needs, IMO. IF you do work on it, please submit it back so others can benefit

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Search/report on who Joined, Renewed, Graced, Expired in 'last week'
April 08, 2010, 01:37:17 am
We just used the detail.php report (or a copy of it) and added the modified date field in + the renewal date (and the custom fields).

We're still working with it to see it works OK

Index: CRM/Report/Form/Member/Detail.php
===================================================================
--- CRM/Report/Form/Member/Detail.php   (revision 26715)
+++ CRM/Report/Form/Member/Detail.php   (working copy)
@@ -37,7 +37,7 @@
 require_once 'CRM/Report/Form.php';
 require_once 'CRM/Member/PseudoConstant.php';
 
-class CRM_Report_Form_Member_Detail extends CRM_Report_Form {
+class CRM_Report_Form_Member_DetailMod extends CRM_Report_Form {
 
     protected $_addressField = false;
     
@@ -46,9 +46,9 @@
     protected $_phoneField   = false;
     
     protected $_summary      = null;
-   
+     protected $_customGroupExtends = array( 'Contact' );   
     function __construct( ) {
-        $this->_columns =
+              $this->_columns =
             array( 'civicrm_contact' =>
                    array( 'dao'     => 'CRM_Contact_DAO_Contact',
                           'fields'  =>
@@ -103,7 +103,30 @@
                           
                           'grouping'=> 'member-fields',
                           ),
-                   
+                   'civicrm_membership_log' =>
+                   array( 'dao'       => 'CRM_Member_DAO_MembershipLog',
+                          'fields'    =>
+                          array(                             
+                                'modified_date'    => array( 'title'     => 'Modified Date',
+                                                                  'default'   => false ),
+                                'renewal_reminder_date' => array( 'title'     => ts('Renewal Reminder Date'),
+                                                                  'default'   => false ),
+                                ),
+                          'filters' => array(                         
+                                             'modified_date'    =>
+                                             array( 'operatorType'  => CRM_Report_Form::OP_DATE,
+                                                    'title'         =>  ts( 'Modified Date' ),
+                                                    ),
+                                             'renewal_reminder_date'    =>
+                                             array( 'operatorType'  => CRM_Report_Form::OP_DATE,
+                                                    'title'         =>  ts( 'Renewal Reminder Date' )
+                                                   ),
+                                             ),
+                         
+                          'grouping'=> 'member-fields',
+                          ),
+                         
+                         
                    'civicrm_membership_status' =>
                    array( 'dao'      => 'CRM_Member_DAO_MembershipStatus',
                           'alias'    => 'mem_status',
@@ -218,9 +241,12 @@
                              {$this->_aliases['civicrm_membership']}.contact_id AND {$this->_aliases['civicrm_membership']}.is_test = 0
                LEFT  JOIN civicrm_membership_status {$this->_aliases['civicrm_membership_status']}
                           ON {$this->_aliases['civicrm_membership_status']}.id =
-                             {$this->_aliases['civicrm_membership']}.status_id ";
+                             {$this->_aliases['civicrm_membership']}.status_id
+               LEFT  JOIN civicrm_membership_log {$this->_aliases['civicrm_membership_log']}
+                          ON {$this->_aliases['civicrm_membership']}.id =
+                             {$this->_aliases['civicrm_membership_log']}.membership_id               
 
-       
+        ";
         //used when address field is selected
         if ( $this->_addressField ) {
             $this->_from .= "
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Search/report on who Joined, Renewed, Graced, Expired in 'last week'

This forum was archived on 2017-11-26.