cal.com
cal.com copied to clipboard
Fix #4318 fix getBusyTimes to factor in all users from collective bookings
What does this PR do?
This PR changes the query for bookings in getBusyTimes.ts
to look for all bookings where the user is attached to the event, instead of just bookings where the user is the organizer.
Fixes # 4318
Environment: Staging(main branch) / Production
Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] Chore (refactoring code, technical debt, workflow improvements)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
How should this be tested?
It's a pretty simple change, I verified it by deploying it to my self-hosted instance and checking that the time slot that wasn't being blocked off for a user is now being blocked off.
The issue that I initially had is now resolved for me.
Checklist
@isaiahdahl is attempting to deploy a commit to the cal Team on Vercel.
A member of the Team first needs to authorize it.
Ahh yes of course. Ok I'll adjust.
@emrysal I pushed an update, pulled code from packages/trpc/server/routers/viewer/booking.tsx
Are you able to confirm that when it's a round robin event type, the person who gets booked or selected will be the userId on the booking? Not just the user who created the round robin event?
I still think this code would be right but if it's not updating the userId on the booking when it's round robin, maybe it should be.
hey @isaiahdahl can you update your branch? it seems like we can't:
@PeerRich yup, done.
@PeerRich or @emrysal Is there anything else I can do to get this merged? I keep pressing the update branch button but it doesn't take long before it's out of date again.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
cal | ✅ Ready (Inspect) | Visit Preview | Oct 6, 2022 at 7:19PM (UTC) |
Is this PR still relevant? Or should we close it? @isaiahdahl
@alannnc Yes, it's still relevant. I tried keeping the branch up to date for a while but then no one was taking a look at it so I stopped.