Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Rescheduling email when there is broken calendar integration #15669

Conversation

hariombalhara
Copy link
Member

@hariombalhara hariombalhara commented Jul 5, 2024

What does this PR do?

The rescheduling emails were not sent in case of a failure with one of the apps/integrations that could be a Calendar App or a conferencing app. This was intentional because a separate Broken Integration Email goes in that case that has the booking details as well as the information on which App is broken. The email has a clear subject inviting the user to take action on the issue.
image

There are two reasons why it was a problem:

  • Broken integration email was sent only when a Conferencing App integration fails. For a calendar integration, there was no Broken integration email being sent. This resulted in a scenario where the meeting is successfully rescheduled, calendars are updated, webhooks are sent but no reschedule email is sent to any of the organizer or attendee.
  • Broken Integration Email is sent only to the organizer and thus no other attendee has email communication about the reschedule.

New Approach

Send rescheduled email as well as Broken Integration Email(not fixing the Calendar App Broken integration email in this PR)

I think it is perfectly fine for the organizer to receive two emails in that case. One informing about the reschedule and the other informing about the broken App.

Broken Integration Email
image

Reschedule Email
image

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have added a Docs issue here 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?

  • Book an event that has CalVideo location set.
  • Remove Daily Video env variables so that Video creation fails
  • Reschedule the booking and notice that Broken Integration Email along with the regular reschedule emails will go.

Copy link

vercel bot commented Jul 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ai ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 8, 2024 2:40pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Jul 8, 2024 2:40pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Jul 8, 2024 2:40pm

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @hariombalhara and the rest of your teammates on Graphite Graphite

Copy link

linear bot commented Jul 5, 2024

@hariombalhara hariombalhara marked this pull request as ready for review July 5, 2024 08:58
@graphite-app graphite-app bot requested a review from a team July 5, 2024 08:58
@dosubot dosubot bot added bookings area: bookings, availability, timezones, double booking calendar-apps area: calendar, google calendar, outlook, lark, microsoft 365, apple calendar emails area: emails, cancellation email, reschedule email, inbox, spam folder, not getting email 🐛 bug Something isn't working labels Jul 5, 2024
@dosubot dosubot bot added this to the v4.3 milestone Jul 5, 2024
Copy link

graphite-app bot commented Jul 5, 2024

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (07/05/24)

1 reviewer was added to this PR based on Keith Williams's automation.

Copy link
Contributor

@Udit-takkar Udit-takkar left a comment

Choose a reason for hiding this comment

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

Left few comments

Copy link
Contributor

@Udit-takkar Udit-takkar left a comment

Choose a reason for hiding this comment

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

Need to figure out few things before we merge this

@hariombalhara
Copy link
Member Author

Will discuss it more, but here is my opinion on this PR.

The question is how does one consider the rescheduling has been done.

  • Booking is rescheduled in our DB first. If that fails, then booking fails and user is notified about it during booking.

  • If Calendar event update fails, people haven't been notified through calendar about it.

  • We weren't sending the rescheduled emails earlier, so they weren't notified about it through email

  • But the webhook fires. So, as per webhook the rescheduling occured.

So, if we go with the approach of failing the booking itself if calendar update fails, then the inconsistency won't arise. But that's a big decision and a separate discussion.

I think doing the change in the PR atleast improves the situation as DB, email communication and webhooks are in sync as these are the one we control directly.

@hariombalhara
Copy link
Member Author

Discussed internally, we are good to go @Udit-takkar !! Thanks for stopping me and suggesting to discuss it 🙏

Copy link
Contributor

github-actions bot commented Jul 8, 2024

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

Seventy-eight Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/apps 279.9 KB 507.58 KB 145.02% (🟢 -1.22%)
/apps/[slug] 297.49 KB 525.17 KB 150.05% (🟢 -1.23%)
/apps/[slug]/[...pages] 588.61 KB 816.29 KB 233.22% (🟢 -1.15%)
/apps/categories 256.25 KB 483.93 KB 138.27% (🟢 -1.23%)
/apps/categories/[category] 262.01 KB 489.69 KB 139.91% (🟢 -1.23%)
/apps/installed/[category] 278.35 KB 506.03 KB 144.58% (🟢 -1.78%)
/auth/saml-idp 12.22 KB 239.9 KB 68.54% (🟢 -20.80%)
/availability 426.15 KB 653.83 KB 186.81% (🟢 -1.79%)
/availability/[schedule] 410.57 KB 638.25 KB 182.36% (🟢 -1.65%)
/bookings/[status] 326.16 KB 553.84 KB 158.24% (🟢 -1.15%)
/enterprise 256.31 KB 483.99 KB 138.28% (🟢 -1.22%)
/event-types 561.26 KB 788.94 KB 225.41% (🟢 -1.17%)
/event-types/[type] 437.47 KB 665.15 KB 190.04% (🟢 -1.15%)
/insights 474.66 KB 702.34 KB 200.67% (🟢 -1.68%)
/more 255.81 KB 483.49 KB 138.14% (🟢 -1.22%)
/settings/admin 262.25 KB 489.93 KB 139.98% (🟢 -1.21%)
/settings/admin/apps 275.49 KB 503.17 KB 143.76% (🟢 -1.24%)
/settings/admin/apps/[category] 275.48 KB 503.16 KB 143.76% (🟢 -1.24%)
/settings/admin/flags 265.97 KB 493.65 KB 141.04% (🟢 -1.24%)
/settings/admin/impersonation 262.64 KB 490.32 KB 140.09% (🟢 -1.21%)
/settings/admin/lockedSMS 283.74 KB 511.42 KB 146.12% (🟢 -1.18%)
/settings/admin/oAuth 274.25 KB 501.93 KB 143.41% (🟢 -1.24%)
/settings/admin/orgMigrations/_OrgMigrationLayout 251.18 KB 478.86 KB 136.82% (🟢 -1.22%)
/settings/admin/orgMigrations/moveTeamToOrg 300.92 KB 528.6 KB 151.03% (🟢 -1.20%)
/settings/admin/orgMigrations/moveUserToOrg 320.75 KB 548.43 KB 156.69% (🟢 -1.17%)
/settings/admin/orgMigrations/removeTeamFromOrg 300.68 KB 528.36 KB 150.96% (🟢 -1.20%)
/settings/admin/orgMigrations/removeUserFromOrg 300.69 KB 528.37 KB 150.96% (🟢 -1.19%)
/settings/admin/organizations 264.14 KB 491.82 KB 140.52% (🟢 -1.21%)
/settings/admin/organizations/[id]/edit 262.8 KB 490.48 KB 140.14% (🟢 -1.22%)
/settings/admin/users 264.91 KB 492.59 KB 140.74% (🟢 -1.21%)
/settings/admin/users/[id]/edit 393.97 KB 621.65 KB 177.61% (🟢 -1.21%)
/settings/admin/users/add 393.63 KB 621.31 KB 177.52% (🟢 -1.22%)
/settings/billing 262.46 KB 490.14 KB 140.04% (🟢 -1.21%)
/settings/developer/api-keys 266.74 KB 494.42 KB 141.26% (🟢 -1.24%)
/settings/developer/webhooks 266.92 KB 494.6 KB 141.31% (🟢 -1.24%)
/settings/developer/webhooks/[id] 267.9 KB 495.58 KB 141.59% (🟢 -1.22%)
/settings/developer/webhooks/new 267.92 KB 495.6 KB 141.60% (🟢 -1.22%)
/settings/my-account/appearance 314.34 KB 542.02 KB 154.86% (🟢 -1.52%)
/settings/my-account/calendars 274.37 KB 502.05 KB 143.44% (🟢 -1.10%)
/settings/my-account/conferencing 272.35 KB 500.03 KB 142.87% (🟢 -1.95%)
/settings/my-account/general 377.86 KB 605.54 KB 173.01% (🟢 -1.23%)
/settings/my-account/out-of-office 267.38 KB 495.06 KB 141.45% (🟢 -1.25%)
/settings/my-account/profile 410.31 KB 637.99 KB 182.28% (🟢 -1.23%)
/settings/organizations/[id]/about 159.67 KB 387.35 KB 110.67% (🟡 +0.48%)
/settings/organizations/[id]/add-teams 159.67 KB 387.34 KB 110.67% (🟡 +0.47%)
/settings/organizations/admin-api 262.41 KB 490.09 KB 140.03% (🟢 -1.22%)
/settings/organizations/appearance 122.33 KB 350.01 KB 100.00% (🟢 -48.02%)
/settings/organizations/billing 262.49 KB 490.17 KB 140.05% (🟢 -1.21%)
/settings/organizations/dsync 295.12 KB 522.8 KB 149.37% (🟢 -1.21%)
/settings/organizations/general 350.7 KB 578.38 KB 165.25% (🟢 -1.23%)
/settings/organizations/members 400.52 KB 628.2 KB 179.48% (🟢 -1.61%)
/settings/organizations/new 159.68 KB 387.36 KB 110.67% (🟡 +0.48%)
/settings/organizations/privacy 267.9 KB 495.58 KB 141.59% (🟢 -1.24%)
/settings/organizations/profile 415.17 KB 642.85 KB 183.67% (🟡 +2.30%)
/settings/organizations/sso 273.08 KB 500.76 KB 143.07% (🟢 -1.21%)
/settings/organizations/teams/other 263.32 KB 491 KB 140.29% (🟢 -1.22%)
/settings/organizations/teams/other/[id]/appearance 275.13 KB 502.8 KB 143.66% (🟢 -1.19%)
/settings/organizations/teams/other/[id]/members 269.81 KB 497.49 KB 142.14% (🟢 -1.24%)
/settings/organizations/teams/other/[id]/profile 473.53 KB 701.21 KB 200.35% (🟢 -1.24%)
/settings/platform 260.91 KB 488.59 KB 139.60% (🟢 -1.23%)
/settings/platform/new 120.69 KB 348.37 KB 99.53% (🟡 +0.52%)
/settings/platform/oauth-clients/[clientId]/edit 259.22 KB 486.9 KB 139.11% (🟢 -1.22%)
/settings/platform/oauth-clients/create 258.36 KB 486.04 KB 138.87% (🟢 -1.23%)
/settings/security/impersonation 267.56 KB 495.24 KB 141.50% (🟢 -1.25%)
/settings/security/password 305.71 KB 533.39 KB 152.40% (🟢 -1.23%)
/settings/security/sso 272.53 KB 500.21 KB 142.92% (🟢 -1.21%)
/settings/security/two-factor-auth 271.04 KB 498.72 KB 142.49% (🟢 -1.24%)
/settings/teams 261.99 KB 489.67 KB 139.91% (🟢 -1.22%)
/settings/teams/[id]/appearance 275.11 KB 502.79 KB 143.65% (🟢 -1.19%)
/settings/teams/[id]/billing 262.49 KB 490.17 KB 140.05% (🟢 -1.21%)
/settings/teams/[id]/members 379.93 KB 607.61 KB 173.60% (🟢 -1.23%)
/settings/teams/[id]/profile 474.31 KB 701.99 KB 200.57% (🟢 -1.24%)
/settings/teams/new 193.08 KB 420.76 KB 120.22% (🟢 -1.81%)
/teams 256.04 KB 483.72 KB 138.21% (🟢 -1.23%)
/upgrade 256.16 KB 483.84 KB 138.24% (🟢 -1.23%)
/video/[uid] 291.18 KB 518.86 KB 148.24% (🟢 -0.17%)
/workflows 288.07 KB 515.75 KB 147.36% (🟢 -1.17%)
/workflows/[workflow] 414.61 KB 642.29 KB 183.51% (🟢 -1.44%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@keithwillcode keithwillcode merged commit ad61d48 into main Jul 10, 2024
37 checks passed
@keithwillcode keithwillcode deleted the 07-05-fix_rescheduling_email_when_there_is_broken_calendar_integration branch July 10, 2024 09:32
verstratenbram added a commit to verstratenbram/cal.com that referenced this pull request Jul 16, 2024
* commit '0dd3b2562458522ad002b4ea967e2b10855a4ab6': (130 commits)
  chore: v4.2.5 (calcom#15735)
  fix: api v2 unit tests  (calcom#15733)
  fix: event type back button (calcom#15722)
  fix: remove console.log and tsignore apiv2 (calcom#15732)
  fix: api-v2 controllers e2e tests (calcom#15724)
  fix: Text in Embed Code  Visibility Fixed (calcom#15711)
  chore: sort calendar crendentials in event manager (calcom#15448)
  chore: cache org guard and fix roles guard apiv2 (calcom#15719)
  Revert "fix: Autodetection of time zone only updated default time zone (calcom#15392)" (calcom#15720)
  feat: add POST end point to mark calls as no-shows (calcom#15690)
  chore: add i18n to atoms (calcom#15698)
  fix: set conferencing apps as default (calcom#15376)
  fix: disable google-meet in user onboarding if google-calendar is not installed (calcom#15702)
  fix: Rescheduling email when there is broken calendar integration (calcom#15669)
  chore: v4.2.4 (calcom#15703)
  fix: 404s becoming 500s (calcom#15696)
  fix: delete reserved slot on booker unmount (calcom#15700)
  chore: add caching apiv2 roles guard (calcom#15694)
  refactor: handleNewBooking calcom#3 (calcom#15612)
  fix: incorrect booking seats full error on collective seated event (calcom#15602)
  ...

# Conflicts:
#	packages/emails/templates/attendee-request-email.ts
#	packages/emails/templates/attendee-was-requested-to-reschedule-email.ts
#	packages/emails/templates/organizer-cancelled-email.ts
#	packages/emails/templates/organizer-location-change-email.ts
#	packages/emails/templates/organizer-payment-refund-failed-email.ts
#	packages/emails/templates/organizer-request-email.ts
#	packages/emails/templates/organizer-request-reminder-email.ts
#	packages/emails/templates/organizer-requested-to-reschedule-email.ts
#	packages/emails/templates/organizer-rescheduled-email.ts
#	packages/emails/templates/organizer-scheduled-email.ts
p6l-richard pushed a commit to p6l-richard/cal.com-fork that referenced this pull request Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bookings area: bookings, availability, timezones, double booking 🐛 bug Something isn't working calendar-apps area: calendar, google calendar, outlook, lark, microsoft 365, apple calendar consumer core area: core, team members only emails area: emails, cancellation email, reschedule email, inbox, spam folder, not getting email High priority Created by Linear-GitHub Sync ready-for-e2e
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-3937] Confirmation email is not being send out when adding more attendees.
3 participants