-
Notifications
You must be signed in to change notification settings - Fork 452
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
Bug/mailchip ajax cleanup #5267
Conversation
…CRM/CRM into bug/mailchip-ajax-cleanup
return true; | ||
} | ||
if ($this->hasKey) { | ||
$rootAPI = $this->myMailchimp->get(""); |
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.
ensure we have an active mailchimp with subscribers in it
$lists = $this->myMailchimp->get("lists")['lists']; | ||
LoggerUtils::getAppLogger()->debug("MailChimp list enumeration took: ". $time->getMiliseconds(). " ms. Found ".count($lists)." lists"); | ||
foreach($lists as &$list) { | ||
$listmembers = $this->myMailchimp->get('lists/'.$list['id'].'/members',['count' => 100000]); |
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.
The number of records to return. Default value is 10. Maximum value is 1000
This was the issue as 100000 was kicking back 0 subs
foreach ($lists as &$list) { | ||
$list['members'] = []; | ||
$listmembers = $this->myMailchimp->get('lists/' . $list['id'] . '/members', | ||
[ |
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.
extra filters
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.
As per chat with @DawoudIO in Gitter; this looks good to me and functions without any apparent regression bugs in my dev environments. However, I don’t have any data to test with except in production so have not completed functional testing. Given other developer’s successful testing, I’m comfortable merging this one.
What's this PR do?
-- list of members in CRM not in Mail Chimp list
-- list of MailChimp users not in CRM
Screenshots (if appropriate)
What Issues does it Close?
Closes #5268 #5269 #5270
How should this be manually tested?