Skip to content

Add civirules action to send emails to case contacts on case

Overview

This MR implements a new CiviRules action called Send Email to case contacts on a case to handle sending emails to case contacts. Currently, we don't have any action to trigger emails for case contacts for a particular case. We have one action in place called Send Email to contacts on a case that only triggers emails to contacts who have relationships with the case.

Also, as part of this change, we are modifying the label of the existing rule action from Send Email to contacts on a case to Send Email to related contacts on a case. to prevent conflicts with the new rule we are introducing for Case contacts.

After email_trigger

Technical Details

  • Created new CivirulesAction CRM_Emailapi_CivirulesAction_SendToCaseContactsOnCase, which basically calls the getCaseContacts function to fetch all the CaseContacts for the Case ID via the CaseContact CiviCRM API call.
  • Also added upgrader upgrade_1008 to insert this new action into the civirule_action table.
Edited by hitesh_compucorp

Merge request reports