fix(packages/app-store): exclude cancelled events and filter by date range in getAvailability#28743
Open
zhyd1997 wants to merge 2 commits intocalcom:mainfrom
Open
fix(packages/app-store): exclude cancelled events and filter by date range in getAvailability#28743zhyd1997 wants to merge 2 commits intocalcom:mainfrom
zhyd1997 wants to merge 2 commits intocalcom:mainfrom
Conversation
…etAvailability Fixes two bugs in the ICS feed calendar service that caused false-positive busy times, resulting in "No available users found" errors for users with multiple calendar connections (e.g. Proton + Google Calendar via ICS feed). 1. Skip events with STATUS:CANCELLED - cancelled/declined meetings in ICS feeds were incorrectly counted as busy time, blocking otherwise free slots. 2. Filter non-recurring events by dateFrom/dateTo - unlike recurring events (which already filtered by range), non-recurring events were all returned regardless of whether they fell within the requested window. Adds tests covering both behaviours. Fixes calcom#23391 https://claude.ai/code/session_01QKRwyaEnVrG3HLW1hRzGtG
|
|
…oundary Follow-up from Opus 4.6 code review of the fix for issue calcom#23391. - Hoist rangeStart/rangeEnd dayjs objects outside the vevents.forEach loop so they are constructed once per getAvailability call instead of per-event. - Fix all-day event boundary: change overlap filter from strict isBefore to !isAfter, matching RFC 5545 §3.6.1 exclusive DTEND semantics. An April 3 all-day event has DTEND = April 4 00:00 UTC which equalled dateFrom and was incorrectly included in the range. - Add 4 new tests: all-day event in range, all-day event out of range, multi-day event spanning entire range, STATUS:TENTATIVE treated as busy. https://claude.ai/code/session_01QKRwyaEnVrG3HLW1hRzGtG
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.
Fixes two bugs in the ICS feed calendar service that caused false-positive busy times, resulting in "No available users found" errors for users with multiple calendar connections (e.g. Proton + Google Calendar via ICS feed).
Skip events with STATUS:CANCELLED - cancelled/declined meetings in ICS feeds were incorrectly counted as busy time, blocking otherwise free slots.
Filter non-recurring events by dateFrom/dateTo - unlike recurring events (which already filtered by range), non-recurring events were all returned regardless of whether they fell within the requested window.
Adds tests covering both behaviours.
https://claude.ai/code/session_01QKRwyaEnVrG3HLW1hRzGtG
What does this PR do?
Visual Demo (For contributors especially)
A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).
Video Demo (if applicable):
Image Demo (if applicable):
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Checklist