Fix custom date range filter excluding sessions on end date#14430
Merged
rtibbles merged 1 commit intolearningequality:release-v0.19.xfrom Mar 19, 2026
Merged
Conversation
KDateRange returns Date objects at midnight (start of day). The frontend sent this raw value as end_date, but the backend filter uses exclusive lt, so all sessions on the selected end date were excluded. Add one day to the end date before sending so the exclusive boundary includes the full day. Fixes learningequality#14424 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Build Artifacts
Smoke test screenshot |
marcellamaki
approved these changes
Mar 19, 2026
Member
marcellamaki
left a comment
There was a problem hiding this comment.
code changes make sense for the handling of this case, and manual QA confirms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Custom date range filter in Attendance History excluded all sessions on the selected end date.
KDateRangereturns Date objects at midnight (start of day), and the backendend_datefilter uses exclusivelt. Sending midnight of the selected date meantsession_start_datetime < midnightexcluded the entire day.Fix: add one day to the custom end date before sending, so the exclusive
ltboundary includes all sessions on the selected date.References
Fixes #14424
Reviewer guidance
The change is in
getDateRange()inAttendanceHistoryPage.vue:191-200— only the custom date range path is affected. Preset ranges (Last 7/30/365 days) already usenow()which works correctly with theltfilter.AI usage
This PR was implemented by Claude Code using TDD. Tests were written first, verified failing, then the fix was applied and verified passing. Manual verification was done via Playwright browser automation and confirmed independently by me in my own browser session.