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) »
  • UpdateMembership.php not recalculating newly created member status
Pages: [1]

Author Topic: UpdateMembership.php not recalculating newly created member status  (Read 1368 times)

annaleevk

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 3
  • Carpe Noctem!
    • Women in Development, New York
  • CiviCRM version: 3.4.5
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.48
  • PHP version: 5.2.14
UpdateMembership.php not recalculating newly created member status
January 12, 2012, 08:32:35 am
Does anyone know how to force the UpdateMembership.php to recalculate expired members?  I recently created 2 new member statuses which represent 91 days thru 119 days after their expire date and 120+ days after their expire date.

The status seems to be set up correctly as they are calculating when I go into an old expired record and re-save the membership record but they do not seem to be re-calculating the status when I run the nightly UpdateMembership.php script.

Any ideas?  Does anyone have a workaround that does not involve manually going into each membership record and hitting save?

Thanks,
Annalee
Annalee Van Kleeck
Lyric Systems, LLC
201 951.8711
annalee@lyricsystems.com

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: UpdateMembership.php not recalculating newly created member status
January 13, 2012, 12:27:04 am
UpdateMembership.php script ignores memberships with "Pending", "Cancelled" and "Expired" statuses.

Kurund
Found this reply helpful? Support CiviCRM

Robyn

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.4.5
  • CMS version: Drupal 7
Re: UpdateMembership.php not recalculating newly created member status
November 20, 2012, 01:50:03 pm
I'm in a similar position to the OP.  My Board changed the membership rules and now  I have to have 2 new membership status that apply after a membership becomes expired.

I sure dont want to have to go through them all manually..so my questions:

1 can UpdateMembership.php be edited to allow updating of expired memberships

2 are there likely to be unintended consequences of doing that?


thanks for any suggestions

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: UpdateMembership.php not recalculating newly created member status
November 20, 2012, 03:15:06 pm
You could make a temporary edit to CRM/Member/BAO/Membership.php, remove this code (line 2486):
Code: [Select]
            array_search('Expired', $allStatus),

and then run the scheduled job (or deprecated bin script) - they both call the same function.

You'll want to test on a copy of your DB, and revert the change.
Protect your investment in CiviCRM by  becoming a Member!

Robyn

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.4.5
  • CMS version: Drupal 7
Re: UpdateMembership.php not recalculating newly created member status
November 20, 2012, 04:45:17 pm

that's great,  thank you very much

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • UpdateMembership.php not recalculating newly created member status

This forum was archived on 2017-11-26.