feat: managed event reassignment#24809
Merged
alishaz-polymath merged 87 commits intomainfrom Dec 1, 2025
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
3 tasks
Contributor
There was a problem hiding this comment.
1 issue found across 15 files (reviewed changes from recent commits).
Prompt for AI agents (all 1 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/features/ee/managed-event-types/reassignment/utils/buildNewBookingPlan.ts">
<violation number="1" location="packages/features/ee/managed-event-types/reassignment/utils/buildNewBookingPlan.ts:26">
JSDoc claims this is a "pure function" but it uses `Date.now()` on line 53, making it non-deterministic. Consider updating the comment to remove the "pure function" claim, or document that the UID generation is intentionally unique per call.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
| /** | ||
| * Builds the new booking plan for a reassigned booking | ||
| * | ||
| * This is a pure function that constructs the booking data structure needed |
Contributor
There was a problem hiding this comment.
JSDoc claims this is a "pure function" but it uses Date.now() on line 53, making it non-deterministic. Consider updating the comment to remove the "pure function" claim, or document that the UID generation is intentionally unique per call.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/features/ee/managed-event-types/reassignment/utils/buildNewBookingPlan.ts, line 26:
<comment>JSDoc claims this is a "pure function" but it uses `Date.now()` on line 53, making it non-deterministic. Consider updating the comment to remove the "pure function" claim, or document that the UID generation is intentionally unique per call.</comment>
<file context>
@@ -0,0 +1,103 @@
+/**
+ * Builds the new booking plan for a reassigned booking
+ *
+ * This is a pure function that constructs the booking data structure needed
+ * for the reassignment transaction. It generates a new UID, computes the booking
+ * title, and assembles all fields from the original booking.
</file context>
✅ Addressed in 0d46dab
CarinaWolli
reviewed
Nov 27, 2025
|
|
||
| export const OrganizerReassignedEmail = (props: React.ComponentProps<typeof OrganizerScheduledEmail>) => { | ||
| const t = props.teamMember?.language.translate || props.calEvent.organizer.language.translate; | ||
| const isRoundRobin = props.calEvent.schedulingType === SchedulingType.ROUND_ROBIN; |
Member
There was a problem hiding this comment.
This is still not working for me
packages/features/ee/managed-event-types/reassignment/managedEventManualReassignment.ts
Show resolved
Hide resolved
packages/features/ee/managed-event-types/reassignment/managedEventReassignment.ts
Show resolved
Hide resolved
CarinaWolli
previously requested changes
Nov 27, 2025
packages/features/ee/managed-event-types/reassignment/managedEventReassignment.ts
Show resolved
Hide resolved
...atures/ee/managed-event-types/reassignment/services/ManagedEventManualReassignmentService.ts
Outdated
Show resolved
Hide resolved
...atures/ee/managed-event-types/reassignment/services/ManagedEventManualReassignmentService.ts
Outdated
Show resolved
Hide resolved
...ges/features/ee/managed-event-types/reassignment/services/ManagedEventReassignmentService.ts
Outdated
Show resolved
Hide resolved
...ges/features/ee/managed-event-types/reassignment/services/ManagedEventReassignmentService.ts
Outdated
Show resolved
Hide resolved
...features/ee/managed-event-types/reassignment/services/ManagedEventWorkflowReminderService.ts
Outdated
Show resolved
Hide resolved
...features/ee/managed-event-types/reassignment/services/ManagedEventWorkflowReminderService.ts
Outdated
Show resolved
Hide resolved
CarinaWolli
approved these changes
Dec 1, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR introduces full support for booking reassignment within Managed Events, enabling both manual and auto reassignment of bookings created under a parent + child event-type model.
Previously, reassignment logic existed only for Round Robin event types (where bookings reference a single event type with multiple hosts). Managed Events differ in that each booking belongs to a child event type (one per user), so reassignment requires cancelling the old booking and creating a new one with the new host.
Adds two new routes: managedEventManualReassign (explicit user choice) and managedEventReassign (auto-select available user)
Core logic ensures:
ReassignDialog.tsxdetect managed context and show child-user list, availability indicatorsHere’s a polished, reviewer-friendly PR description for Cal.com’s PR #24809 — “feat: managed event reassignment”. It’s structured so that anyone reading it (even without context) can quickly understand what changed, why it matters, and how to test / validate it. Feel free to copy-paste and adapt as needed (or paste into a GitHub PR template).
Core changes & functionality
New backend endpoints
managedEventManualReassign— explicitly reassign a booking to a chosen user.managedEventReassign— automatically pick an available user (fallback / auto-assign).getManagedEventUsersToReassign— lists eligible users (with availability), supports pagination.Transactional reassignment logic
iCalUID, incrementsiCalSequence, sets new idempotencyKey.Frontend / UI updates
ReassignDialog.tsxfor managed events that shows: paginated eligible users, availability status, and manual / auto options.Full test coverage
Performance / no new scale risk
🚧 Notes & Follow-ups
BOOKING_REASSIGNEDwebhook trigger to allow external systems to respond to reassignment (out of scope for this PR).📝 Checklist (completed / for reviewers)
👇 TL;DR
This PR adds fully-functional managed-event reassignment — manual or automatic — without breaking existing booking flows, preserving data integrity, availability constraints, audit history, and notifications.
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):
Loom
Image Demo (if applicable):
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Checklist
Summary by cubic
Adds managed event reassignment so bookings on managed event types can be reassigned automatically to the best available user or manually to a specific teammate. Updates the UI and APIs while keeping round-robin behavior unchanged for non-managed events.
New Features
Bug Fixes
Written for commit 46f5302. Summary will update automatically on new commits.