fix: CSV generation from insights returns empty results#22771
fix: CSV generation from insights returns empty results#22771romitg2 wants to merge 2 commits intocalcom:mainfrom
Conversation
|
@romitg2 is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe change modifies the control flow in the Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes were found. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)**/*.{js,jsx,ts,tsx}📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)
Files:
🧠 Learnings (2)📓 Common learningspackages/lib/server/service/insightsBooking.ts (2)Learnt from: eunjae-lee Learnt from: eunjae-lee ⏰ 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). (3)
🔇 Additional comments (2)
✨ Finishing Touches
🧪 Generate unit tests
🪧 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 (
|
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (07/28/25)1 reviewer was added to this PR based on Keith Williams's automation. "Add community label" took an action on this PR • (07/28/25)1 label was added to this PR based on Keith Williams's automation. |
|
Fixed by this:- #22775 |
Solution:
when user was asking for CSV data, then in authorization condition we were first checking weather user is team/org owner or admin (which isn't true for individual bookings) so it was returning always false (NOTHING_CONDITION)
Fixes CSV generation from insights returns empty results #22765 (GitHub issue number)
Fixes CAL-6162 (Linear issue number - should be visible at the bottom of the GitHub issue description)
Before: (No CSV data)
Screen.Recording.2025-07-28.at.3.39.33.PM.mov
After:
Screen.Recording.2025-07-28.at.3.37.31.PM.mov
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