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) »
  • UpdateMembershipRecord.php issue
Pages: [1]

Author Topic: UpdateMembershipRecord.php issue  (Read 1232 times)

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
UpdateMembershipRecord.php issue
June 09, 2010, 08:18:20 am
I found an issue with the UpdateMembershipRecord.php script.

It contains an IF clause to exclude canceled, expired, and pending records from the status processing. But the email reminder is outside of that clause. What I see happening is:

- a membership record exists for a type that uses reminder emails. Therefore there is a value in the reminder_date field.
- admin overrides membership to cancelled.
- the reminder_date value is not impacted by the cancellation. Therefore, the user receives a reminder email on a cancelled membership.

From where I sit, the easiest fix seems to be to include the send reminder email block in the IF statement excluding those statuses. But it could also be fixed by improving the status change save so that if the change is to certain status values, the reminder_date field is set to NULL.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: UpdateMembershipRecord.php issue
June 09, 2010, 08:21:07 am
Actually, regardless of whether the status change to cancel impacts the membership record, I think the send email work should be within the status exclusion IF statement. If for no other reason than as an assurance against sending emails when it shouldn't, and to reduce the script's processing work. (it already is a processing intensive script)
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: UpdateMembershipRecord.php issue
June 09, 2010, 12:59:21 pm
Currently this script is doing two works and those are independent.
1. Update Membership Record.
2. Send Reminder Mails.

I think we should put the separate clause for reminder mail process.

IMO It is worth to send reminder for Expired Membership, though we are not going updating its record.

kiran
You Are Designed To Choose... Defined By Choice.

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: UpdateMembershipRecord.php issue
June 09, 2010, 01:28:18 pm
In the current functionality, the reminder email can be configured to be sent for X days prior to expiration (technically it's X days prior to the end date). So there should never be a scenario in which the renewal reminder is sent to expired records -- they are always sent prior to the record's end date.

My primary concern is cancelled records, which are done via the override. If a membership record is cancelled, they should absolutely not receive the renewal reminder.

FWIW -- I went ahead and wrapped the send email inside the IF clause and it's working fine -- cancelled records are ignored when the script is run, as they should be.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: UpdateMembershipRecord.php issue
June 15, 2010, 06:12:19 pm
Issue filed for this here:
http://issues.civicrm.org/jira/browse/CRM-6362
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • UpdateMembershipRecord.php issue

This forum was archived on 2017-11-26.