Skip to content

Comments

fix: hide cancel/reschedule links in emails when disabled#27637

Merged
anikdhabal merged 1 commit intocalcom:mainfrom
evertonresende:fix/hide-cancel-reschedule-links-email
Feb 10, 2026
Merged

fix: hide cancel/reschedule links in emails when disabled#27637
anikdhabal merged 1 commit intocalcom:mainfrom
evertonresende:fix/hide-cancel-reschedule-links-email

Conversation

@evertonresende
Copy link
Contributor

Summary

Fixes #22906

When disableCancelling or disableRescheduling is enabled on an event type, confirmation emails still showed non-functional cancel/reschedule links. This was confusing for attendees who clicked links that led to error pages.

Root cause: The ManageLink email component already had correct conditional logic to hide these links based on calEvent.disableCancelling and calEvent.disableRescheduling. However, two code paths constructed the CalendarEvent object manually without including these flags:

  1. Booking confirmation handler (confirm.handler.ts) — used when organizers confirm pending bookings
  2. Payment booking flow (getBooking.ts) — used when bookings involve payments

Since the flags were undefined, !undefined === true, so ManageLink always rendered the links.

Changes

  • Added disableCancelling and disableRescheduling to the Prisma select for eventType in both files
  • Mapped these flags into the CalendarEvent object with ?? false fallback

Test plan

  • Create an event type with "Disable Cancelling" enabled
  • Create a booking that requires confirmation
  • Confirm the booking and verify the confirmation email does NOT show the cancel link
  • Create an event type with "Disable Rescheduling" enabled
  • Repeat and verify the email does NOT show the reschedule link
  • Create an event type with both disabled and verify neither link appears
  • Create a paid event type with cancelling disabled and verify email after payment does NOT show cancel link
  • Verify normal bookings (without disable flags) still show both links

When disableCancelling or disableRescheduling is enabled on an event type,
the confirmation email still showed non-functional cancel/reschedule links.

The ManageLink email component already had correct conditional logic to
hide these links, but two flows constructed the CalendarEvent manually
without including the flags: the booking confirmation handler and the
payment booking flow. This caused the flags to be undefined, which
ManageLink interpreted as enabled.

Added disableCancelling and disableRescheduling to the Prisma select and
CalendarEvent object in both confirm.handler.ts and getBooking.ts.

Closes calcom#22906
@paragon-review
Copy link

paragon-review bot commented Feb 5, 2026

Paragon Review Unavailable

Hi @evertonresende! To enable Paragon reviews on this repository, please register at https://home.polarity.cc

Once registered, connect your GitHub account and Paragon will automatically review your pull requests.

@github-actions github-actions bot added emails area: emails, cancellation email, reschedule email, inbox, spam folder, not getting email Low priority Created by Linear-GitHub Sync Public 🧹 Improvements Improvements to existing features. Mostly UX/UI labels Feb 5, 2026
@evertonresende evertonresende marked this pull request as ready for review February 5, 2026 01:39
@evertonresende evertonresende requested a review from a team as a code owner February 5, 2026 01:39
@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Feb 5, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Copy link
Contributor

@anikdhabal anikdhabal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

@anikdhabal anikdhabal added run-ci Approve CI to run for external contributors ready-for-e2e labels Feb 5, 2026
@anikdhabal anikdhabal enabled auto-merge (squash) February 5, 2026 06:21
@anikdhabal anikdhabal merged commit dc3e681 into calcom:main Feb 10, 2026
106 of 117 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Created by Linear-GitHub Sync emails area: emails, cancellation email, reschedule email, inbox, spam folder, not getting email 🧹 Improvements Improvements to existing features. Mostly UX/UI Low priority Created by Linear-GitHub Sync Public ready-for-e2e run-ci Approve CI to run for external contributors size/XS

Projects

None yet

3 participants