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

Fix choreBreak accounting bug #136

Closed
kronosapiens opened this issue Nov 12, 2023 · 3 comments · Fixed by #141
Closed

Fix choreBreak accounting bug #136

kronosapiens opened this issue Nov 12, 2023 · 3 comments · Fixed by #141
Labels
bug Something isn't working priority High priority issues

Comments

@kronosapiens
Copy link
Member

https://github.com/zaratanDotWorld/mirror/blob/master/src/core/chores.js#L339

Tried fixing it over the summer but it introduced another bug. Time to revisit this.

@kronosapiens kronosapiens added bug Something isn't working priority High priority issues labels Nov 12, 2023
@kronosapiens
Copy link
Member Author

kronosapiens commented Jan 1, 2024

The issue was that the use of orWhere excluded the filter on the residentId; if we hit the orWhere branch, the result would return for all users.

b9637ed

@kronosapiens
Copy link
Member Author

Seems as though that didn't fix the issue, so reopening.

@kronosapiens
Copy link
Member Author

kronosapiens commented Jan 4, 2024

Turns out I re-introduced the underlying issue in a different way. The solution was a slightly clunkier query which correctly captures the x AND (y OR z) logic. This is what I get for trying to be too clever.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority High priority issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant