Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 2.1
-
Fix Version/s: 2.2.0
-
Component/s: CiviMember
-
Labels:None
Description
Rationale
========
Currently, the UpdateMembershipRecord.php script inserts a record in civicrm_membership_log each time it sends a renewal reminder email to a contact (line 216 in the script). However, this log record isn't a good way to track reminders sent (the data is basically a clone of the associated membership record) AND it's not visible to users/admins. We should remove this record insert and replace it with an activity record insert - which will then be clearly visible when viewing the contact's activity history.
Implementation
============
- Create a new activity type - "Membership Renewal Reminder" and add it to the pre-populated activity types. Modify the upgrade script to add this type as well.
- Remove the membership_log insert
- Insert an activity record for each reminder email sent - write the contents of the sent email to activity.details (so user can view the message that was sent from Activity tab -> View. Let's assign the recipient contact_id to activity.source_contact_id for now (and not set a target contact). This is a bit "misleading", but it's consistent with how we handle activity records when a contribution or membership is recorded for a contact. (If we assigned the logged in user's contact_id to source_contact_id then they would have hundreds of activities in their activities tab).