CRM-4165 Record an activity when we send membership renewal reminder emails

    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).

        Attachments

          Activity

          [CRM-4165] Record an activity when we send membership renewal reminder emails
          Sunny Sharma added a comment -

          tested for v2.2

          Yashodha Chaku added a comment -

          assigning for 2.2 verification QA

          Sushant Paste added a comment -

          Tested in r20413.

          Kurund Jalmi added a comment -

          Batch move to verification

          Yashodha Chaku added a comment -

          assigning for 3.0 QA

            People

            • Assignee:
              Michał Mach
              Reporter:
              David Greenberg

              Dates

              • Created:
                Updated:
                Resolved: