Skip to content

fix(availability): include PENDING bookings in getBusyTimes to prevent invisible slot overlap #29967

Description

@harsh4vardhan

Bug Description

getBusyTimes only queries bookings with status: BookingStatus.ACCEPTED when computing busy slots. Bookings in PENDING status (created by requiresConfirmation: true event types) are invisible to the availability check. Two users can book the same slot simultaneously, both pass the availability check, and both create PENDING bookings for the same organizer time slot.

Affected file

packages/features/busyTimes/services/getBusyTimes.ts (line 81) — busy-time query uses status: BookingStatus.ACCEPTED only:

where: { status: BookingStatus.ACCEPTED, ... }

Fix

Include BookingStatus.PENDING alongside BookingStatus.ACCEPTED in the busy-time filter for event types that have requiresConfirmation: true, so pending bookings hold the slot tentatively.

Related

Environment

cal.com main branch (2026-08-13).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions