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

Delete rescheduled booking #7910

Merged
merged 14 commits into from Mar 27, 2023
Merged

Delete rescheduled booking #7910

merged 14 commits into from Mar 27, 2023

Conversation

CarinaWolli
Copy link
Member

What does this PR do?

Fixes that rescheduled bookings are not deleted anymore for non seat events.

Also fixes the number of available seats shown on BookingPage. It was taking the number of available seats of the booking that was rescheduled and not of the new slot the users wants to book.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How should this be tested?

  • Book event
  • reschedule event
  • check and make sure rescheduled event is not in the list of upcoming bookings anymore

@CarinaWolli CarinaWolli requested review from a team March 23, 2023 17:50
@vercel
Copy link

vercel bot commented Mar 23, 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 27, 2023 at 8:56AM (UTC)
inkblot ❌ Failed (Inspect) Mar 27, 2023 at 8:56AM (UTC)
1 Ignored Deployment
Name Status Preview Comments Updated
ui ⬜️ Ignored (Inspect) Visit Preview Mar 27, 2023 at 8:56AM (UTC)


//delete orignal rescheduled booking (no seats event)
if (!eventType.seatsPerTimeSlot) {
await prisma.booking.delete({
Copy link
Member Author

Choose a reason for hiding this comment

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

We used to delete the booking in the eventManger.reschedule function. This got changed in #5427 to handle seated events differently, but we forgot to delete nomal rescheduled events

@github-actions
Copy link
Contributor

github-actions bot commented Mar 23, 2023

📦 Next.js Bundle Analysis

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

Three 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)
/[user]/book 183.25 KB 416.46 KB 118.99% (🟢 -0.01%)
/d/[link]/book 182.9 KB 416.12 KB 118.89% (🟢 -0.01%)
/team/[slug]/book 182.9 KB 416.12 KB 118.89% (🟢 -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

deploysentinel bot commented Mar 23, 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/27/2023 09:08:05am UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: ec4baa0

Started: 03/27/2023 09:03:11am 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
4.40% (8) 8 / 182 runs
failed over last 7 days
32.42% (59) 59 / 182 runs
flaked over last 7 days

View Detailed Build Results


Copy link
Contributor

@emrysal emrysal left a comment

Choose a reason for hiding this comment

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

Works for me 🥳

Copy link
Contributor

@emrysal emrysal left a comment

Choose a reason for hiding this comment

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

But I defer to the tests 🙏 - some fixes needed

Copy link
Contributor

@joeauyeung joeauyeung left a comment

Choose a reason for hiding this comment

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

@CarinaWolli, thanks for finding the missing code. I adjusted the tests to the new behaviour and just have a question.

expect(newBooking).not.toBeNull();
expect(rescheduledBooking).toBeNull();
Copy link
Member Author

Choose a reason for hiding this comment

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

@emrysal Test for my fix. Fails before and succeeds now

@@ -26,7 +26,11 @@ test.describe("Onboarding", () => {
await page.locator("input[name=username]").fill("new user onboarding");
await page.locator("input[name=name]").fill("new user 2");
await page.locator("input[role=combobox]").click();
await page.locator("text=Europe/London GMT +0:00").click();
Copy link
Member Author

Choose a reason for hiding this comment

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

London is now in timezone GMT +1 because of dst

Copy link
Contributor

@emrysal emrysal left a comment

Choose a reason for hiding this comment

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

Approved.

I also added a follow-up ticket on the back of this to (maybe) change the delete behaviour.

#7946

@emrysal emrysal merged commit 3edb6f5 into main Mar 27, 2023
20 checks passed
@emrysal emrysal deleted the fix/rescheduled-booking-not-deleted branch March 27, 2023 09:34
@PeerRich PeerRich added the core area: core, team members only label Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core area: core, team members only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants