-
-
Notifications
You must be signed in to change notification settings - Fork 817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev/core#448 Fix issue where when building mailings with smart groups, removed members of the smart group were being included #12945
Conversation
… groups and contats removed from smart groups not being properly checked
(Standard links)
|
also pinging @johntwyman @andrew-cormick-dockery as you two will want to be on top of this (surprised we haven't seen this surface yet) |
Jenkins re test this please |
|
||
// Create a New mailing, Testing contacts removed from smart group. | ||
// In this case groupIDs6 will only pick up contacts[0] amd contacts[8] with it's | ||
// criteria. However we are deliberly going to remove contactIds[8] from the group |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seamuslee001 I think you mean "deliberately" - not "deliberly"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or he was slurring....
@seamuslee001 any idea when this started happening? Was this bug recently introduced by some other change? |
@jusfreeman the bug seems to have been introduced in 5.3 or earlier. |
Test looks good. The fix by @tmannell makes sense & has been tested by @seamuslee001 in creating the test - merging |
@seamuslee001 I just merged & then realised we talked about this going agaiinst the rc! |
Overview
When using a smart group as a mailing list, users who unsubscribe from the smart group are still included in the mailing.
Before
When creating a mailing using a smart group as a mailing list, users who have previously unsubscribed from the smart group mailing list will still receive the mailing.
No Unit Test on this particular part of the recipient building logic
After
Users who have unsubscribed form smart group mailing lists and are marked as removed in the civicrm_group_contact table, no longer receive the mailings.
Unit test exists
Technical Details
In CRM/Mailing/BAO/Mailing.php the query below doesn't join to the civicrm_group_contact to check if the recipient has been removed.
Comments
This PR replaces #12943 which was against the wrong branch & had no test but had the correct fix, which has been cherry-picked in.
This appears to be a semi-recent regression - having seemingly worked in 5.2
ping @eileenmcnaughton @monishdeb