fix: Change filters to correctly get the right bookingCounts
What does this PR do?
Drafting with self-review so it becomes clear what happened.
TODO: This needs tests (interplay of different filters) TODO: Create safety net to re-open slots when no slots are found due to filters.
bookingCounts returned the booking counts of all hosts but also increased the count of other hosts if the checked host was an attendee on his Booking. This could decrease the minBookingCount considerably (as this may only happen once) - this was the root cause of the issue; but it would only be triggered if the host that was attended by the other checked host was also being checked.
This triggered "No available slots" when the host that suddenly was included was an old host (part of eventType.hosts, but no longer part of the team) as that old host would then be chosen as qualified host, as he was so far behind the other hosts and then result 0 slots because he wasn’t part of the routedMemberIds
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| cal | ⬜️ Ignored (Inspect) | Visit Preview | Nov 28, 2024 8:52pm | |
| calcom-web-canary | ⬜️ Ignored (Inspect) | Visit Preview | Nov 28, 2024 8:52pm |
This PR is being marked as stale due to inactivity.
This PR is being marked as stale due to inactivity.
This logic has been deprecated (and replaced by shared code)