cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

feat: add roundRobinHostId to booking creation API and mapping

Open KartikLabhshetwar opened this issue 2 months ago • 2 comments

What does this PR do?

  • Fixes #XXXX (GitHub issue number)
  • Fixes CAL-XXXX (Linear issue number - should be visible at the bottom of the GitHub issue description)

Visual Demo (For contributors especially)

A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).

Video Demo (if applicable):

  • Show screen recordings of the issue or feature.
  • Demonstrate how to reproduce the issue, the behavior before and after the change.

Image Demo (if applicable):

  • Add side-by-side screenshots of the original and updated change.
  • Highlight any significant change(s).

Mandatory Tasks (DO NOT REMOVE)

  • [ ] I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • [ ] I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • [ ] I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Are there environment variables that should be set?
  • What are the minimal test data to have?
  • What is expected (happy path) to have (input and output)?
  • Any other important info that could help to test that PR

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my changes generate no new warnings

Summary by cubic

Adds support for pre-selecting a specific host for round-robin events via a new roundRobinHostId field. When provided, availability and booking target only that host; when omitted, existing round-robin logic remains.

  • New Features
    • Added optional roundRobinHostId to booking creation body and API DTOs.
    • Accepted in slots queries; availability is limited to that host when set.
    • Booking and slots services validate the host is eligible; return an error if not available for the event.
    • Booker Platform adds a roundRobinHostId prop and forwards it through hooks and the booking mapper.
    • Updated zod/TRPC/validation schemas and controllers to pass the field end-to-end.

Written for commit b3bf3fb3b15edd014d8fb0091d9543764a0ca54f. Summary will update automatically on new commits.

KartikLabhshetwar avatar Dec 02 '25 14:12 KartikLabhshetwar

@KartikLabhshetwar is attempting to deploy a commit to the cal-staging Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Dec 02 '25 14:12 vercel[bot]

This PR has been marked as stale due to inactivity. If you're still working on it or need any help, please let us know or update the PR to keep it active.

github-actions[bot] avatar Dec 10 '25 00:12 github-actions[bot]