[CAL-3882] Bug: booker can reschedule and cancel unconfirmed event from email
anikdhabal opened this issue Β· comments
Found a bug? Please fill out the sections below. π
Issue Summary
Currently a booker reschedule and cancel unconfirmed event directly from the email.
Steps to Reproduce
- book an event that require confirmation
- go to the submit email
- cancel or reschedule the booking
Any other relevant information. For example, why do you consider this a bug and what did you expect to happen instead?
Expected Results
Booker couldn't cancel or reschedule an unconfirmed event, as they do not have the ability from the app. Similarly, they shouldn't have the ability from email
To address the issue where a booker can reschedule and cancel unconfirmed events directly from the email, it's crucial to implement a series of checks and updates in the application's logic. Here's a concise plan to resolve this bug:
- Verify Event Confirmation Status: Ensure actions are only allowed for events with the appropriate confirmation status.
- Check User Permissions: Confirm that the user has the necessary permissions to perform the action.
- Respect Event Type Rules: Adhere to specific rules related to the event type, especially for events requiring confirmation or involving round-robin scheduling.
- Handle Round-Robin Scheduling: Properly manage events that could be reassigned to a different host upon rescheduling.
- Update External Calendar Events: Make sure any changes are reflected in linked external calendars.
- Send Appropriate Notifications: Notify all relevant parties about the rescheduling or cancellation.
- Log Actions: Keep a record of all actions for auditing and debugging purposes.
For implementation, you might need to review and update the logic in the following parts of the repository:
- Rescheduling logic in
packages/app-store/vital/lib/reschedule.ts
- Rescheduling tests in
packages/features/bookings/lib/handleNewBooking/test/reschedule.test.ts
This approach ensures that the application consistently enforces rules for unconfirmed events across both the app and email interactions, aligning with the expected behavior.
Details
Sources
- Offer to cancel/request rescheduling for bookings automatically where availability has been modified
- Event Requiring confirmation gets automatically removed from /Bookings/Unconfirmed upon rescheduling
- [CAL-414] Cancel bookings that are not yet confirmed
- packages/app-store/vital/lib/reschedule.ts
- packages/features/bookings/lib/handleNewBooking/test/reschedule.test.ts
- packages/trpc/server/routers/viewer/bookings/requestReschedule.handler.ts
- packages/features/bookings/lib/handleSeats/reschedule/owner/combineTwoSeatedBookings.ts
- packages/emails/src/components/ManageLink.tsx
- apps/web/components/eventtype/EventTeamTab.tsx
- packages/features/bookings/lib/handleNewBooking/test/recurring-event.test.ts
- packages/app-store/googlecalendar/lib/CalendarService.ts
- packages/app-store/wipemycalother/lib/reschedule.ts
- packages/emails/email-manager.ts
- packages/core/EventManager.ts
- packages/features/bookings/lib/handleNewBooking.ts
- packages/features/bookings/lib/handleNewBooking/test/fresh-booking.test.ts
- packages/features/bookings/lib/handleConfirmation.ts
About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a π if this is helpful and π if it is irrelevant.
To continue the conversation, mention @dosu.