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) »
  • Imported memberships not inherited by relationship
Pages: [1]

Author Topic: Imported memberships not inherited by relationship  (Read 1627 times)

TJH43

  • I’m new here
  • *
  • Posts: 24
  • Karma: 0
  • CiviCRM version: 4.4.5
  • CMS version: Drupal 7.27
  • MySQL version: 5.5.37
  • PHP version: 5.3.10
Imported memberships not inherited by relationship
February 09, 2013, 03:23:01 pm
In the Demo system the General membership type was set to 1 year duration and  seven 'General' memberships for the "Alice Smith's home" Household were imported.  All Membership start dates were January 1 starting in 2007 and going to 2013.  The General membership type configured to be inherited by "Household member is". The "Alice Smith's home" Household correctly shows all seven memberships.  However, the three contacts who are household members show only the 2007 membership (by relationship) and none of the other six memberships.

This behavior occurs in a CiviCRM 4.17 site where I am importing memberships and where the inheriting relationship is "Spouse".  The oldest expired memberships and the 'New' status memberships are being inherited.  But the four expired memberships between are not.

Has anyone seen this? Am I missing something?

Thanks




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
Re: Imported memberships not inherited by relationship
February 09, 2013, 04:07:10 pm
hi - i think your goal should be to have only one membership that spans the 7 years not 7 memberships, if i follow you.

so you may need to try importing a single membership that spans the 7 years rather than each of them as a separate membership

so it should look more like this  one http://drupal.demo.civicrm.org/civicrm/contact/view?reset=1&force=1&cid=10&selectedChild=member
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

TJH43

  • I’m new here
  • *
  • Posts: 24
  • Karma: 0
  • CiviCRM version: 4.4.5
  • CMS version: Drupal 7.27
  • MySQL version: 5.5.37
  • PHP version: 5.3.10
Re: Imported memberships not inherited by relationship
February 09, 2013, 05:03:15 pm
The goal is to import membership history which includes multiple memberships with differing periods and with lapses in years and with differrent types (Couple, Individual) for the same contact.

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
Re: Imported memberships not inherited by relationship
February 09, 2013, 05:29:55 pm
Alice Smith's home is showing multiple memberships of the same type

I resaved the 2008 one - and that is now showing on http://drupal.demo.civicrm.org/civicrm/contact/view?action=browse&selectedChild=rel&reset=1&cid=40

Could be that importing them in all one go means the 'inheritance' only kicks in for the first ones. Don't know if that clue might help or not
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

TJH43

  • I’m new here
  • *
  • Posts: 24
  • Karma: 0
  • CiviCRM version: 4.4.5
  • CMS version: Drupal 7.27
  • MySQL version: 5.5.37
  • PHP version: 5.3.10
Re: Imported memberships not inherited by relationship
February 09, 2013, 09:17:20 pm
Petednz,

Thanks for looking at this.

At this end it seems that the first 'New' and the first 'Expired' memberships in the multi-membership import are the only memberships inherited through the spouse relationship.  Running cron and clearing the Drupal and CiviCRM caches did not seem to affect this outcome.

But now as you have suggested ...by opening and re-saving the 'uninherited' memberships in the one spouse ...they now show up in the other 'by relationship'. 

One solution is to repeat this process manually for all 'Couples" memberships.  The advantage of this option is that the 'by relationship' membership is in the system somewhere....and re-saving seems to find it...but there are over 360 couples and maybe three to seven memberships each. 

Another solution might be to delete all memberships and re-import one membership at a time per primary spouse.

Should this be expected behavior in both the Household and Spouse inheritance logic?

This underlying behavior might also cause duplicate 'by relationship' memberships when a membership is imported and a missing 'by relationship' membership is entered manually and then the original membership is re-saved later.

Jim

TJH43

  • I’m new here
  • *
  • Posts: 24
  • Karma: 0
  • CiviCRM version: 4.4.5
  • CMS version: Drupal 7.27
  • MySQL version: 5.5.37
  • PHP version: 5.3.10
Re: Imported memberships not inherited by relationship
February 09, 2013, 09:34:23 pm
This problem might be an instance of the problem reported earlier here:


http://forum.civicrm.org/index.php/topic,20488.msg85669.html#msg85669

Also using  "Batch Update Members via Profile" and adding a Source to update the primary spouse record and flush in the 'by relationship' memberships did not work.
« Last Edit: February 10, 2013, 11:23:40 am by TJH43 »

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
Re: Imported memberships not inherited by relationship
February 10, 2013, 12:42:10 pm
That post you quote seems to have a suggested work around - does it work for you commenting out the line?
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

TJH43

  • I’m new here
  • *
  • Posts: 24
  • Karma: 0
  • CiviCRM version: 4.4.5
  • CMS version: Drupal 7.27
  • MySQL version: 5.5.37
  • PHP version: 5.3.10
Re: Imported memberships not inherited by relationship
February 10, 2013, 01:46:43 pm
Peter,

Thanks.  FYI the line suggested to be commented out is line #1991 in my version of /sites/all/modules/civicrm/CRM/Member/BAO/Membership.php. 

One would have to know what this line does.  Lacking that the problem is the possibility of unforeseen collateral damage down the road.

The option chosen is to edit all 359 imported primary memberships to pick-up the latent "By relationship" memberships.  This has been tested locally and on the Demo and seems to work. 

The Scheduled Job "Update Membership Statuses and Send Renewal Reminders" was run both before and after a test edit.  It did not flush out the by relationship memberships before the edit and did not result in any duplicate 'By relationship' memberships after the edits.

This option potentially solves another problem as well.  The edit will include the Membership Dues payment...which would otherwise have been imported as a separate donation untied to the Membership record (per http://forum.civicrm.org/index.php/topic,16643.msg71141.html#msg71141).  Hopefully the Membership import function will some day have this option.

Jim

TJH43

  • I’m new here
  • *
  • Posts: 24
  • Karma: 0
  • CiviCRM version: 4.4.5
  • CMS version: Drupal 7.27
  • MySQL version: 5.5.37
  • PHP version: 5.3.10
Re: Imported memberships not inherited by relationship
February 11, 2013, 02:04:47 pm
359 'Couple' Memberships were edited and re-saved.  The missing 'by-relationship' memberships were recovered in the process.  The Membership ID's and External Identifiers were downloaded and an import to all 1028 Memberships was done to update the "Member Since" date data.  In the process an 195 membership ID's were not imported as not present in the system.  And now 195 'By Relationship' memberships are missing in the system.

It appears that 'by relationship' memberships are not recorded or are lost on a new/update import.

Executing the System Scheduled job "Update Membership Statuses and Send Renewal Reminders" does not establish the 'by relationship' memberships.

Editing and re-saving the primary individual memberships does re-establish the 'by-relationship' memberships.


btc97

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
  • CiviCRM version: 4.5.4
  • CMS version: Drupal
  • MySQL version: 5.5.37
  • PHP version: 5.3.3
Re: Imported memberships not inherited by relationship
December 15, 2014, 01:02:43 pm
I tried to change a membership type for a number of organisations with "by relationship" memberships, and ran into the same issue. Changing the membership type using batch update didn't update the inherited memberships. Editing and saving the primary organisation individually does update the inherited memberships.

Is there any way to avoid the pain of manually updating each primary member to trigger the change in the "by relationships"?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Imported memberships not inherited by relationship

This forum was archived on 2017-11-26.