Skip to content

feat: soft delete rescheduled booking#7970

Merged
PeerRich merged 20 commits intomainfrom
7946-cal-1341-change-reschedule-booking-flow-handling-of-old-event
Apr 2, 2023
Merged

feat: soft delete rescheduled booking#7970
PeerRich merged 20 commits intomainfrom
7946-cal-1341-change-reschedule-booking-flow-handling-of-old-event

Conversation

@G3root
Copy link
Copy Markdown
Contributor

@G3root G3root commented Mar 28, 2023

What does this PR do?

Fixes #7946. rather than deleting a rescheduled this PR aims to soft delete the rescheduled bookings.

Type of change

  • New feature (non-breaking change which adds functionality)

@G3root G3root requested a review from zomars as a code owner March 28, 2023 08:05
@G3root G3root requested review from a team March 28, 2023 08:05
@G3root G3root linked an issue Mar 28, 2023 that may be closed by this pull request
@linear
Copy link
Copy Markdown

linear bot commented Mar 28, 2023

CAL-1341 Change reschedule booking flow handling of old event

Is your proposal related to a problem?

Currently we are deleting a rescheduled event, this causes the event to 404 when a link is opened that has since been rescheduled. Instead of a hard delete we should set the event as cancelled so a "This event has been cancelled" message can be shown. We may even want to add a new booking status to identity rescheduled events.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 28, 2023

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

Name Status Preview Comments Updated
cal ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 30, 2023 at 4:41PM (UTC)
dhe ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 30, 2023 at 4:41PM (UTC)
1 Ignored Deployment
Name Status Preview Comments Updated
ui ⬜️ Ignored (Inspect) Visit Preview Mar 30, 2023 at 4:41PM (UTC)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 28, 2023

📦 Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 233.32 KB (-7 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

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

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Sixty-two 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)
/404 8.45 KB 241.77 KB 69.08% (+/- <0.01%)
/[user] 70.21 KB 303.53 KB 86.72% (+/- <0.01%)
/[user]/[type] 91.95 KB 325.27 KB 92.93% (+/- <0.01%)
/[user]/[type]/embed 91.97 KB 325.3 KB 92.94% (+/- <0.01%)
/[user]/embed 70.27 KB 303.6 KB 86.74% (+/- <0.01%)
/apps 167.17 KB 400.5 KB 114.43% (+/- <0.01%)
/apps/[slug] 190.89 KB 424.22 KB 121.20% (+/- <0.01%)
/apps/[slug]/[...pages] 392.3 KB 625.62 KB 178.75% (+/- <0.01%)
/apps/categories 152.07 KB 385.39 KB 110.11% (+/- <0.01%)
/apps/categories/[category] 155.94 KB 389.26 KB 111.22% (+/- <0.01%)
/apps/installed/[category] 197.09 KB 430.42 KB 122.98% (+/- <0.01%)
/auth/error 19.24 KB 252.57 KB 72.16% (+/- <0.01%)
/auth/forgot-password 25.63 KB 258.96 KB 73.99% (+/- <0.01%)
/auth/forgot-password/[id] 32.83 KB 266.16 KB 76.04% (+/- <0.01%)
/auth/login 40.1 KB 273.43 KB 78.12% (+/- <0.01%)
/auth/logout 7.56 KB 240.88 KB 68.82% (+/- <0.01%)
/availability 155.38 KB 388.7 KB 111.06% (+/- <0.01%)
/availability/[schedule] 272.13 KB 505.46 KB 144.42% (+/- <0.01%)
/availability/troubleshoot 152.76 KB 386.08 KB 110.31% (+/- <0.01%)
/booking/[uid] 123.62 KB 356.95 KB 101.98% (+/- <0.01%)
/bookings/[status] 272.46 KB 505.78 KB 144.51% (+/- <0.01%)
/d/[link]/[slug] 91.59 KB 324.92 KB 92.83% (+/- <0.01%)
/d/[link]/[slug]/embed 91.62 KB 324.95 KB 92.84% (+/- <0.01%)
/event-types/[type] 383.08 KB 616.4 KB 176.12% (+/- <0.01%)
/insights 387.22 KB 620.55 KB 177.30% (+/- <0.01%)
/more 151.69 KB 385.02 KB 110.01% (+/- <0.01%)
/settings/admin 157.15 KB 390.48 KB 111.56% (+/- <0.01%)
/settings/admin/apps 165.83 KB 399.16 KB 114.05% (+/- <0.01%)
/settings/admin/apps/[category] 165.82 KB 399.15 KB 114.04% (+/- <0.01%)
/settings/admin/flags 160.04 KB 393.37 KB 112.39% (+/- <0.01%)
/settings/admin/impersonation 157.43 KB 390.76 KB 111.65% (+/- <0.01%)
/settings/billing 157.26 KB 390.59 KB 111.60% (+/- <0.01%)
/settings/developer/api-keys 186.42 KB 419.74 KB 119.93% (+/- <0.01%)
/settings/developer/webhooks 159.92 KB 393.24 KB 112.35% (+/- <0.01%)
/settings/developer/webhooks/[id] 190.61 KB 423.93 KB 121.12% (+/- <0.01%)
/settings/developer/webhooks/new 190.47 KB 423.79 KB 121.08% (+/- <0.01%)
/settings/my-account/appearance 171.23 KB 404.55 KB 115.59% (+/- <0.01%)
/settings/my-account/calendars 191.45 KB 424.77 KB 121.36% (+/- <0.01%)
/settings/my-account/conferencing 163.07 KB 396.4 KB 113.26% (+/- <0.01%)
/settings/my-account/general 266.42 KB 499.74 KB 142.78% (+/- <0.01%)
/settings/my-account/profile 274.24 KB 507.56 KB 145.02% (+/- <0.01%)
/settings/security/impersonation 159.3 KB 392.63 KB 112.18% (+/- <0.01%)
/settings/security/password 192.6 KB 425.92 KB 121.69% (+/- <0.01%)
/settings/security/sso 167 KB 400.32 KB 114.38% (+/- <0.01%)
/settings/security/two-factor-auth 161.76 KB 395.08 KB 112.88% (+/- <0.01%)
/settings/teams 156.9 KB 390.22 KB 111.49% (+/- <0.01%)
/settings/teams/[id]/appearance 171.25 KB 404.57 KB 115.59% (+/- <0.01%)
/settings/teams/[id]/billing 157.13 KB 390.46 KB 111.56% (+/- <0.01%)
/settings/teams/[id]/members 297.13 KB 530.46 KB 151.56% (+/- <0.01%)
/settings/teams/[id]/profile 269.45 KB 502.77 KB 143.65% (+/- <0.01%)
/settings/teams/[id]/sso 167.09 KB 400.41 KB 114.40% (+/- <0.01%)
/signup 25.5 KB 258.82 KB 73.95% (+/- <0.01%)
/team/[slug] 72.62 KB 305.94 KB 87.41% (+/- <0.01%)
/team/[slug]/[type] 91.6 KB 324.92 KB 92.83% (+/- <0.01%)
/team/[slug]/[type]/embed 91.63 KB 324.95 KB 92.84% (+/- <0.01%)
/team/[slug]/embed 72.68 KB 306.01 KB 87.43% (+/- <0.01%)
/teams 151.91 KB 385.24 KB 110.07% (+/- <0.01%)
/video/meeting-ended/[uid] 14.67 KB 247.99 KB 70.85% (+/- <0.01%)
/video/meeting-not-started/[uid] 14.3 KB 247.62 KB 70.75% (+/- <0.01%)
/video/no-meeting-found 6.6 KB 239.93 KB 68.55% (+/- <0.01%)
/workflows 164.81 KB 398.13 KB 113.75% (+/- <0.01%)
/workflows/[workflow] 294.02 KB 527.35 KB 150.67% (+/- <0.01%)
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.

@deploysentinel
Copy link
Copy Markdown

deploysentinel bot commented Mar 28, 2023

Current Playwright Test Results Summary

✅ 66 Passing - ⚠️ 1 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 03/30/2023 04:52:54pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: e3df7fd

Started: 03/30/2023 04:47:38pm UTC

⚠️ Flakes

📄   apps/web/playwright/event-types.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Event Types tests user can add multiple organizer address
Retry 1Initial Attempt
2.25% (4) 4 / 178 runs
failed over last 7 days
32.02% (57) 57 / 178 runs
flaked over last 7 days

View Detailed Build Results


@emrysal
Copy link
Copy Markdown
Contributor

emrysal commented Mar 28, 2023

Some type errors, but personally I wouldn't vote for implementing BookingStatus.RESCHEDULED as an additional status. - soft delete should set the previous booking to CANCELLED and create a new one with fromReschedule.

"user_needs_to_confirm_or_reject_booking": "{{user}} still needs to confirm or reject the booking.",
"user_needs_to_confirm_or_reject_booking_recurring": "{{user}} still needs to confirm or reject each booking of the recurring meeting.",
"meeting_is_scheduled": "This meeting is scheduled",
"meeting_is_rescheduled": "This meeting is rescheduled",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Similarly, we don't really need a special message for rescheduled bookings, just show cancel message

@G3root
Copy link
Copy Markdown
Contributor Author

G3root commented Mar 28, 2023

@emrysal pushed some changes

Copy link
Copy Markdown
Member

@CarinaWolli CarinaWolli left a comment

Choose a reason for hiding this comment

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

e2e test is failing:
Screenshot 2023-03-29 at 07 26 23
let's remove that line and check if the status of the rescheduled booking is CANCELLED

Copy link
Copy Markdown
Member

@CarinaWolli CarinaWolli left a comment

Choose a reason for hiding this comment

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

LGTM!

@PeerRich PeerRich merged commit 9fe912c into main Apr 2, 2023
@PeerRich PeerRich deleted the 7946-cal-1341-change-reschedule-booking-flow-handling-of-old-event branch April 2, 2023 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CAL-1341] Change reschedule booking flow handling of old event

4 participants