Details
-
Type: Sub-task
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7.25
-
Fix Version/s: 4.7.31
-
Component/s: None
-
Labels:
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Core Team Funds
-
Verified?:Yes
Description
This function getMailRecipients is created after simplifying the code of self::getRecipients(..) and these are the changes made:
1. Takes mailing ID as the only parameter, and remove dependency on mailing Job
2. This function ONLY fetches and store mailing recipients, doesn't handle SMS mode
3. Use less JOINs in underlying queries.
4. Simplifies code to fetch contacts from selected mailing smart group(s).
5. Doesn't execute query needlessly, e.g.
a) if SG (smart groups) are selected then ONLY queries responsible to fetch contacts from SG are executed
b) If no 'Include' groups are selected then simply return as this also means no groups are selected to fetch recipients.
6. Refreshes smart group contact cache at once.
7. Keeping both the function for now to reduce any unintended regressions
This function is later called via mailing.create API using a special parameter
{get_recipients: TRUE}, for now, it's been used by angularJs services to avoid any rollbacks and fetch mailing recipients of selected groups.