feat: add duplicate functionality for managed event types#26792
Merged
alishaz-polymath merged 15 commits intomainfrom Feb 18, 2026
Merged
feat: add duplicate functionality for managed event types#26792alishaz-polymath merged 15 commits intomainfrom
alishaz-polymath merged 15 commits intomainfrom
Conversation
Co-Authored-By: peer@cal.com <peer@cal.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
|
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. |
Contributor
Devin AI is resolving merge conflictsThis PR has merge conflicts with the Devin will:
If you prefer to resolve conflicts manually, you can close the Devin session and handle it yourself. |
Co-Authored-By: unknown <>
- Add info alert disclaimer in duplicate modal for managed event types - Pass schedulingType to duplicate dialog via query params - Redirect to assignment tab after duplicating managed event types - Add translation key for managed event type duplicate disclaimer Co-Authored-By: peer@cal.com <peer@cal.com>
…s://git-manager.devin.ai/proxy/github.com/calcom/cal.com into devin/duplicate-managed-event-types-1768299152
alishaz-polymath
previously approved these changes
Feb 9, 2026
5391b8d
…or duplicate handler (#27973) * refactor: replace PrismaMock unit test with Prisma integration test for duplicate handler Co-Authored-By: ali@cal.com <alishahbaz7@gmail.com> * fix: re-throw TRPCErrors in duplicate handler catch block and assert specific error codes in tests Co-Authored-By: ali@cal.com <alishahbaz7@gmail.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
packages/trpc/server/routers/viewer/eventTypes/heavy/duplicate.handler.test.ts
Show resolved
Hide resolved
pedroccastro
pushed a commit
that referenced
this pull request
Feb 21, 2026
* feat: add duplicate functionality for managed event types Co-Authored-By: peer@cal.com <peer@cal.com> * feat: add disclaimer and redirect for managed event type duplication - Add info alert disclaimer in duplicate modal for managed event types - Pass schedulingType to duplicate dialog via query params - Redirect to assignment tab after duplicating managed event types - Add translation key for managed event type duplicate disclaimer Co-Authored-By: peer@cal.com <peer@cal.com> * test: add tests for managed event type duplication Co-Authored-By: peer@cal.com <peer@cal.com> * refactor: replace PrismaMock unit test with Prisma integration test for duplicate handler (#27973) * refactor: replace PrismaMock unit test with Prisma integration test for duplicate handler Co-Authored-By: ali@cal.com <alishahbaz7@gmail.com> * fix: re-throw TRPCErrors in duplicate handler catch block and assert specific error codes in tests Co-Authored-By: ali@cal.com <alishahbaz7@gmail.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Hariom Balhara <1780212+hariombalhara@users.noreply.github.com> Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com>
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?
Enables the "Duplicate" option in the dropdown menu for managed event types. Previously, managed event types could not be duplicated, requiring users to manually recreate all settings when creating a new managed event type.
Changes
Removed the
!isManagedEventTypecondition from the duplicate button visibility check in both desktop and mobile views of the event types listing page. The existing duplicate handler already supports managed event types correctly:schedulingType: MANAGEDparentId: null, which is preserved correctlyNote: Children managed event types (event types created from a managed parent) still cannot be duplicated, as the
!isChildrenManagedEventTypecheck remains in place.UX Improvements for Managed Event Type Duplication
?tabName=team) so they can immediately add team membersmanaged_event_type_duplicate_disclaimerfor the disclaimer messageHandler Bug Fix
duplicate.handler.tscatch block to re-throwTRPCErrorinstances (e.g.FORBIDDEN,NOT_FOUND) instead of swallowing them and re-wrapping asINTERNAL_SERVER_ERRORTest Migration
duplicate.handler.test.ts) with a real Prisma integration test (duplicate.handler.integration-test.ts)as anycasts — uses proper typing throughoutFORBIDDEN), and slug conflict (CONFLICT)Visual Demo
Duplicate option visible on managed event type:
Duplicate modal with disclaimer for managed event types:
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Also verify:
Checklist
Human Review Checklist
packages/trpc/server/routers/viewer/eventTypes/heavy/duplicate.handler.ts) properly handles managed event types?tabName=teamworks correctly after duplicating a managed event typeduplicate.handler.integration-test.tsfor completenessevent-types-listing-view.tsxlines 432-446 — there appears to be extra indentation that may cause lint issuesschedulingTypequery param is properly validated via zod schemaLink to Devin run: https://app.devin.ai/sessions/d6a4ad26a26140a2b7d70a5519e2636e
Requested by: @alishaz-polymath