Skip to content
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

Merged
merged 33 commits into from
Jun 16, 2020
Merged

Bug/mailchip ajax cleanup #5267

merged 33 commits into from
Jun 16, 2020

Conversation

DawoudIO
Copy link
Contributor

@DawoudIO DawoudIO commented Jun 9, 2020

What's this PR do?

  • New Person/Family API /mailchimp to get person MailChimp status
  • Moves MailChimp email status lookup to AJAX
  • moved MailChimp data to new tab on the person view.
  • updated family view to working MailChimp status
  • updated MailChimp lists to include
    -- list of members in CRM not in Mail Chimp list
    -- list of MailChimp users not in CRM

Screenshots (if appropriate)

image

image

What Issues does it Close?

Closes #5268 #5269 #5270

How should this be manually tested?

  • enabled mailchimp
  • set users with and without emails for persons and family

@DawoudIO DawoudIO added this to the 4.1.0 milestone Jun 9, 2020
@DawoudIO DawoudIO requested review from crossan007 and MrClever June 9, 2020 16:43
@DawoudIO DawoudIO self-assigned this Jun 15, 2020
@DawoudIO DawoudIO marked this pull request as ready for review June 15, 2020 22:51
return true;
}
if ($this->hasKey) {
$rootAPI = $this->myMailchimp->get("");
Copy link
Contributor Author

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]);
Copy link
Contributor Author

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',
[
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra filters

Copy link
Collaborator

@MrClever MrClever left a 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.

@DawoudIO DawoudIO merged commit 3068be8 into master Jun 16, 2020
@DawoudIO DawoudIO deleted the bug/mailchip-ajax-cleanup branch June 16, 2020 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mailchimp is missing
2 participants