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: Wrong stats on campaigns list page #2228

Open
crayolakat opened this issue Oct 10, 2022 · 0 comments
Open

Bug: Wrong stats on campaigns list page #2228

crayolakat opened this issue Oct 10, 2022 · 0 comments
Assignees
Labels
C-bug Type: Bug

Comments

@crayolakat
Copy link
Collaborator

Describe the bug
On the campaigns list page, the "Unassigned" and "Needs Response" stats show the wrong values, or no value at all sometimes. Unable to reproduce at will but it happens to certain campaigns on our production site which is deployed on AWS Lambda and uses Redis.

Expected behavior
Numbers should be accurate. The "Unassigned" value for a campaign should correspond to the following SQL:

SELECT COUNT(*)
FROM campaign_contact cc
WHERE cc.campaign_id = <campaign_id> AND cc.assignment_id IS NULL;

The "Needs Response" value for a campaign should correspond to the following SQL:

SELECT COUNT(*)
FROM campaign_contact cc
WHERE cc.campaign_id = <campaign_id> AND cc.is_opted_out = 'false' AND cc.message_status = 'needsResponse';

Screenshots
Screen Shot 2022-10-10 at 3 11 18 PM

Platform:

  • OS: macOS
  • Browser: Chrome
  • Desktop
  • Version: 106.0.5249.61

Additional context
These "Unassigned" and "Needs Response" counts are stored in Redis and calculated when certain actions are taken. I believe somewhere along the way, the calculations are going wrong or aren't happening at all. I also think the "Needs Response" count isn't excluding opt-outs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants