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

Correct cache handling for zero counts (Fix #7003) #7409

Merged
merged 1 commit into from May 2, 2019

Conversation

Projects
5 participants
@pjeby
Copy link
Contributor

commented Apr 12, 2019

Please be sure you are submitting this against the staging branch.

Q A
Bug fix? Yes
New feature? No
Automated tests included? No
Related user documentation PR URL
Related developer documentation PR URL
Issues addressed (#s or URLs) #7003
BC breaks?
Deprecations?

Description:

The cache handling in EmailModel for queued and pending counts was leaving stale cache entries when there was a previous non-zero value in cache. This PR ensures that zero counts are cached the same way as non-zero counts, and that they aren't ignored when retrieved.

Steps to reproduce the bug:

  1. Create a segment email
  2. See the pending badge
  3. Send the email
  4. Go back on the list of email and see that the pending badge is still showed even if it has been sent.

Steps to test this PR:

  1. Load up this PR
  2. Same as above, except the badge goes away as expected

List deprecations along with the new alternative:

List backwards compatibility breaks:

@npracht npracht added this to the 2.15.2 milestone Apr 12, 2019

@npracht npracht added this to Ready to Test (first time) in Mautic 2 Apr 12, 2019

@johbuch
Copy link

left a comment

tested and it works, the pending is not displayed after sending the email
good job

@escopecz escopecz moved this from Ready to Test (first time) to Ready to Test (confirmation) in Mautic 2 Apr 24, 2019

@dsp76
Copy link

left a comment

I experienced the bug also in every installation without the fix.
I tested the PR with Mautibox - its working! Thanks a lot.

@kuzmany

kuzmany approved these changes May 2, 2019

Mautic 2 automation moved this from Ready to Test (confirmation) to Ready to Test (first time) May 2, 2019

@kuzmany kuzmany merged commit f648ebc into mautic:staging May 2, 2019

2 checks passed

Scrutinizer Analysis: 3 new issues, 1 updated code elements – Tests: passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

Mautic 2 automation moved this from Ready to Test (first time) to Merged May 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.