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 Import (Moderator: Yashodha Chaku) »
  • Membership End date not calculated properly if Member Since date in CSV/import
Pages: [1]

Author Topic: Membership End date not calculated properly if Member Since date in CSV/import  (Read 607 times)

KarinG

  • I post frequently
  • ***
  • Posts: 134
  • Karma: 9
  • CiviCRM version: 4+
  • CMS version: Drupal 6 / 7
  • MySQL version: MariaDB
  • PHP version: 5.3/5.4/5.5
Membership End date not calculated properly if Member Since date in CSV/import
November 14, 2013, 08:22:09 am
Hi,

In 4.3 - this CSV data:

StartDateIDMemberSinceType
2013-01-0112001-01-01Arctic

When imported - produces:

   A., Robyn   Arctic   January 1st, 2001   January 1st, 2013   December 31st, 2001      Expired

So end date is mistakenly calculated as MemberSince date + 1y (from Membership Type settings).

It should be:

   A., Robyn   Arctic   January 1st, 2001   January 1st, 2013   December 31st, 2013      Current   

I think the fix for this may be quite simple - since Member Since (in code: $joinDate) is not required for a Membership import - it should not be used to calculate $calcDates during imports.

In: Member/Import/Parser/Membership.php - in two places:

Code: [Select]
      //to calculate dates
      $calcDates = CRM_Member_BAO_MembershipType::getDatesForMembershipType($formatted['membership_type_id'],
        //$joinDate,
        NULL,
        $startDate,
        $endDate
      );

Or is there more to it?

-- KarinG

KarinG

  • I post frequently
  • ***
  • Posts: 134
  • Karma: 9
  • CiviCRM version: 4+
  • CMS version: Drupal 6 / 7
  • MySQL version: MariaDB
  • PHP version: 5.3/5.4/5.5
Re: Membership End date not calculated properly if Member Since date in CSV/import
November 26, 2013, 12:19:00 pm
Digging into this led to: http://forum.civicrm.org/index.php/topic,30672.msg132020.html - issue is now fixed in the

Code: [Select]
CRM_Member_BAO_MembershipType::getDatesForMembershipType
itself.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Membership End date not calculated properly if Member Since date in CSV/import

This forum was archived on 2017-11-26.