Details
Description
Currently there is no record of the fact that the user "Sent a Copy" of an activity to someone else. This action should be recorded for audit purposes.
Implementation
---------------------
For each recipient of "Send a Copy":
- insert an activity and case_activity record with recipient as activity target (this is the same logic as we use when sending an email to a Case Role from CaseView page)
Use the following values for the activity record:
- Activity Type = "Email"
- source_record_id = ID of the activity being "copied" (using the revision of the activity after saving - which I believe matches the data being sent in the email copy)
- Subject = "{$originalActivitySubject} - copy sent to {$recipientSortName}"
- Details = $bodyOfActualEmailSent (this will be text email formatted activity data)
- Status = Completed
- Actual Date = now()
- Medium = Email
- is Auto = false
-