cal.com
cal.com copied to clipboard
[CAL-3572] Slots API getting a blank response (managed events)
To address the issue with the Slots API returning a blank response for managed events, consider the following potential causes and solutions:
-
Date and Time Zone Handling: Ensure
dayjsis correctly handlinginviteeDateandorganizerTimeZone. Incorrect settings can prevent slot generation. A patch fordayjsrelated issues is available, which might be relevant. -
Minimum Booking Notice: Verify the
minimumBookingNoticeis set appropriately and calculations correctly account for the current time and time zone. -
Working Hours and Overrides: Check that working hours are defined for the
inviteeDateand that no date overrides are blocking potential slots. -
Event Length and Frequency: Make sure the
eventLengthandfrequencyfit within the defined working hours and respect any overrides. -
DST Calculations: Confirm DST calculations for
organizerDSTDiffandinviteeDSTDiffare accurate, especially around DST change dates.
Review the slots.ts file for implementation details and ensure all configurations are correct. If the issue persists, more specific error details or server logs could help diagnose the problem further. Additionally, a similar issue, [CAL-3186] booking API returning empty response, might offer insights or solutions.
Details
Sources
- [CAL-3186] booking API returning empty response
- packages/lib/slots.ts
- .yarn/patches/dayjs-npm-1.11.2-644b12fe04.patch
- apps/api/v1/pages/api/slots/_get.ts
- packages/lib/slots.test.ts
- apps/web/test/lib/getSchedule.test.ts
About Dosu This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
To continue the conversation, mention @dosu.
When creating a managed event type , a template is created and the template is cloned for each assigned user. The copy assigned to user has availability set and is bookable, the original template is not bookable ( as its a template ).
Slots api returns response accordingly as per user schedule when trying to access a users instance of managed event. It returns empty response when passing template's eventId. It seems to be match the expected behaviour .
/team/pro/managetest
a link to template opens booking page while showing no available slots I think it should redirect to not found or show list of bookable team members.
There have been reports of empty slots in event types other than managed, including but not limited to multiple duration events
Finally fixed!