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

[CAL-4987] Use original event link for rescheduling cancelled meeting #18507

Open
CarinaWolli opened this issue Jan 7, 2025 · 5 comments · May be fixed by #18605
Open

[CAL-4987] Use original event link for rescheduling cancelled meeting #18507

CarinaWolli opened this issue Jan 7, 2025 · 5 comments · May be fixed by #18605
Labels
High priority Created by Linear-GitHub Sync 🧹 Improvements Improvements to existing features. Mostly UX/UI

Comments

@CarinaWolli
Copy link
Member

CarinaWolli commented Jan 7, 2025

If a user tries to reschedule an already canceled booking, we throw the error cancelled_bookings_cannot_be_rescheduled.

Same as for past bookings, we do not want to allow rescheduling canceled bookings and instead redirect the user to the original booking link.

From SyncLinear.com | CAL-4987

@CarinaWolli CarinaWolli added the High priority Created by Linear-GitHub Sync label Jan 7, 2025
@dosubot dosubot bot added the 🧹 Improvements Improvements to existing features. Mostly UX/UI label Jan 7, 2025
@Himanshu84p
Copy link

Hello @CarinaWolli
Can you please describe how to produce this event I want to solve this.

@CarinaWolli
Copy link
Member Author

How to reproduce:

  • Create a booking
  • Cancel booking
  • Open reschedule link of the same booking (/reschedule/[uid]) and try to reschedule booking
  • After clicking the confirm button you see the error

What should happen:
Opening the rescheduling link of an already canceled booking should redirect to the original booking link to create a new booking instead of a reschedule

@iharsh02
Copy link

iharsh02 commented Jan 9, 2025

Hello,

I tried to reproduce the same error,

If we visit the endpoint /reschedule/[uid] and the BookingStatus is ACCEPTED, it redirects us to the URL:
http://localhost:3000/testuser/test?rescheduleUid=[uid].

If the BookingStatus is CANCELLED, it redirects us to /booking/uid, which shows that the booking is cancelled.

However, if we directly visit the URL:
http://localhost:3000/testuser/test?rescheduleUid=, even when the BookingStatus is CANCELLED, it redirects the user to the rescheduling page and allows them to reschedule the event.

@CarinaWolli CarinaWolli changed the title [CAL-4987] Use original booking link for rescheduling cancelled meeting [CAL-4987] Use original event link for rescheduling cancelled meeting Jan 10, 2025
@CarinaWolli
Copy link
Member Author

Interesting, thank you for testing @iharsh02. We should make sure that both reschedule links redirect to the original event link for creating a new booking

@iharsh02
Copy link

Interesting, thank you for testing @iharsh02. We should make sure that both reschedule links redirect to the original event link for creating a new booking

validateOriginalRescheduledBooking(originalBooking);

Looking into this issue, I found that the validateOriginalRescheduledBooking function is not being awaited, which causes it to execute asynchronously and allows users to reschedule cancelled bookings before the validation completes.

after await validateOriginalRescheduledBooking function so that it validates the booking before running the reschedule logic.

I am still trying to figure out how to redirect the user to the "Create New Booking" page.

It is working as it should work.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
High priority Created by Linear-GitHub Sync 🧹 Improvements Improvements to existing features. Mostly UX/UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants