Skip to content

fix: set event type description correctly in the confirmation mail#28827

Merged
romitg2 merged 2 commits into
calcom:mainfrom
bandhan-majumder:fix-28818
Apr 20, 2026
Merged

fix: set event type description correctly in the confirmation mail#28827
romitg2 merged 2 commits into
calcom:mainfrom
bandhan-majumder:fix-28818

Conversation

@bandhan-majumder
Copy link
Copy Markdown
Member

@bandhan-majumder bandhan-majumder commented Apr 10, 2026

What does this PR do?

Sets up the event description correctly in the confirmation mail

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):

Screencast.From.2026-04-10.15-04-14.mp4

Image Demo (if applicable):

image

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
  • My PR is too large (>500 lines or >10 files) and should be split into smaller PRs

@bandhan-majumder bandhan-majumder requested a review from a team as a code owner April 10, 2026 09:33
@github-actions github-actions Bot added the 🐛 bug Something isn't working label Apr 10, 2026
@sahitya-chandra sahitya-chandra added ready-for-e2e run-ci Approve CI to run for external contributors labels Apr 10, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 10, 2026

📝 Walkthrough

Walkthrough

The change modifies how the CalendarEvent.description field is populated in the confirmHandler. Previously, it used booking.description, but now it pulls the description from booking.eventType?.description, with a null fallback when unavailable. This is a single-line modification that affects the description source for calendar events during booking confirmation. All other confirmation logic, event construction, and downstream processes remain unaffected.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: setting the event type description correctly in confirmation emails instead of using booking notes.
Linked Issues check ✅ Passed The code change directly addresses issue #28818 by populating CalendarEvent.description from eventType.description instead of booking.description, fixing the incorrect notes display.
Out of Scope Changes check ✅ Passed The change is narrowly scoped to fixing the description field in confirmation emails, aligning with the issue requirements without introducing unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description clearly describes the fix: changing the event description in confirmation emails from booking.description to booking.eventType?.description, which directly addresses the stated objective of showing the correct event type description instead of requester notes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sahitya-chandra
Copy link
Copy Markdown
Member

security audit is failing

@bandhan-majumder
Copy link
Copy Markdown
Member Author

The issue it's showing is for axios it seems: Issue: Axios has a NO_PROXY Hostname Normalization Bypass Leads to SSRF

@DevAsign-Review-Agent
Copy link
Copy Markdown

DevAsign-Review-Agent commented Apr 10, 2026

Merge Score: 95/100

🟢 ███████████████████░ 95%

This PR correctly fixes an issue where the booker's additional notes were being used as the event description in confirmation emails. By mapping booking.eventType?.description to the description field and leaving booking.description for additionalNotes, the email will now display the correct event details. The code change is accurate, safe, and the required data is already being fetched in the Prisma query. The mentioned security audit failure regarding axios is unrelated to this change.

Code Suggestions (1)

Low Priority (1)

  1. packages/trpc/server/routers/viewer/bookings/confirm.handler.ts (Line 320)
    Consider adding a unit or integration test to verify that the event description and additional notes are correctly mapped during booking confirmation.

Reasoning: While the fix is straightforward and correct, adding a test ensures this mapping doesn't regress in future refactors. The PR checklist indicates that automated tests were not confirmed.

📊 Review Metadata
  • Processing Time: 29s
  • Analysis Date: 4/10/2026, 12:32:53 PM

🤖 This review was generated by AI. While we strive for accuracy, please use your judgment when applying suggestions.

💬 Questions about this review? Open an issue or contact support.

@bandhan-majumder
Copy link
Copy Markdown
Member Author

@sahitya-chandra security audit should pass now since axios has been upgraded.

@sahitya-chandra sahitya-chandra added run-ci Approve CI to run for external contributors and removed run-ci Approve CI to run for external contributors labels Apr 13, 2026
@bandhan-majumder
Copy link
Copy Markdown
Member Author

@sahitya-chandra it can be merged now maybe??

@sahitya-chandra
Copy link
Copy Markdown
Member

@bandhan-majumder waiting for someone from foundation team to review it.

I'll try to get it today

@romitg2 romitg2 merged commit 810ad0e into calcom:main Apr 20, 2026
62 of 63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working ready-for-e2e run-ci Approve CI to run for external contributors size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Call confirmations are showing wrong description (uses additional notes instead)

4 participants