-
Notifications
You must be signed in to change notification settings - Fork 10.2k
fix: increment iCalSequence when changing booking location #22847
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: increment iCalSequence when changing booking location #22847
Conversation
- Add iCalSequence parameter to buildCalEventFromBooking function - Update editLocation handler to increment sequence by 1 in CalendarEvent - Update database with incremented iCalSequence when location changes - Update buildCalEventFromBooking test to include new fields - Ensures ICS files properly update existing calendar events instead of creating duplicates Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
WalkthroughThe changes introduce and propagate two new fields, Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15–20 minutes
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🧰 Additional context used📓 Path-based instructions (2)**/*.ts📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)
Files:
**/*.{ts,tsx}📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)
Files:
🧠 Learnings (8)📓 Common learnings
📚 Learning: in the failedbookingsbyfield component (packages/features/insights/components/failedbookingsbyfield....
Applied to files:
📚 Learning: the office365calendar webhook handler in packages/app-store/office365calendar/api/webhook.ts is spec...
Applied to files:
📚 Learning: the filterhostsbysameroundrobinhost function in packages/lib/bookings/filterhostsbysameroundrobinhos...
Applied to files:
📚 Learning: in the insightsbookingservice (packages/lib/server/service/insightsbooking.ts), the constructor stor...
Applied to files:
📚 Learning: applies to **/*repository.ts : repository files must include `repository` suffix, prefix with techno...
Applied to files:
📚 Learning: the outlook calendar integration in cal.com intentionally reuses subscription ids across multiple ev...
Applied to files:
📚 Learning: in cal.com's calendar integration, both google calendar and outlook calendar are designed to allow m...
Applied to files:
🧬 Code Graph Analysis (1)packages/trpc/server/routers/viewer/bookings/editLocation.handler.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (10)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (07/31/25)1 reviewer was added to this PR based on Keith Williams's automation. |
E2E results are ready! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 lgtm
fix: increment iCalSequence when changing booking location
Summary
Fixes an issue where changing a booking location doesn't increment the ICS sequence number, preventing calendar applications from properly updating existing events instead of creating duplicates.
Key Changes:
editLocation.handler.ts
to increment iCalSequence by 1 when location changesbuildCalEventFromBooking.ts
to accept and include iCalSequence in CalendarEvent objectsRoot Cause: The editLocation handler was updating the booking location but not incrementing the ICS sequence number, which violates the ICS specification requirement that sequence numbers must increment when event details change. This caused calendar applications to treat location changes as separate events rather than updates to existing events.
Review & Testing Checklist for Human
iCalSequence
field exists in the Booking model and database schemaRecommended Test Plan:
Diagram
Notes
Link to Devin run: https://app.devin.ai/sessions/3b85205fc9494243a3f7bdf8abb066a5
Requested by: @joeauyeung