Closed w-le closed 2 years ago
Hmm... @w-le, I'm not expecting that calendar to be returned at all.
fix tested OK
As an extension of this fix, can you also ensure that the workplace/dashboard page's "Free rooms now" tile uses the updated availability list logic? Currently it is listing some rooms as available which have been booked out (long term all day events). in particular this example:
staff-api response to free_busy
request:
availability: [{status: "busy", starts_at: 1631484000, ends_at: 1632693600, timezone: "Etc/GMT"}] # epochs are -9d and +5d, so room should be unavailble, yet DASHBOARD states this room is available now
id: "room_adsr_2r2027@REDACTED"
system: {created_at: 1631864995, ...
confirmed dashboard fix worked
0fd1cd0 | Built: Today at 1:29PM
When searching for a room available now, this free_busy request is made: https://REDACTED/api/staff/v1/calendars/free_busy?period_start=1632212700&period_end=1632214500&zone_ids=zone-Cd-0i6y~Xp&capacity=0
with this response:
The epochs in that first system are:
1626559200: 2 months ago
1632693600: 6 days from now
The event that occupies this period is a single, long all-day booking that I've confirmed to be status: busy and Accepted by the room mailbox, so it should not be displayed as available to end users.
staff-api seems to correctly return that the above period is
busy
but it seems the frontend search results are not taking this into account when displaying the list of available rooms. In this example, the room should NOT be listed as available, yet workplace app lists it as available.