calcom / cal.com

Scheduling infrastructure for absolutely everyone.

Home Page:https://cal.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[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

  1. book an event that require confirmation
  2. go to the submit email
  3. 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

CAL-3882

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:

  1. Verify Event Confirmation Status: Ensure actions are only allowed for events with the appropriate confirmation status.
  2. Check User Permissions: Confirm that the user has the necessary permissions to perform the action.
  3. Respect Event Type Rules: Adhere to specific rules related to the event type, especially for events requiring confirmation or involving round-robin scheduling.
  4. Handle Round-Robin Scheduling: Properly manage events that could be reassigned to a different host upon rescheduling.
  5. Update External Calendar Events: Make sure any changes are reflected in linked external calendars.
  6. Send Appropriate Notifications: Notify all relevant parties about the rescheduling or cancellation.
  7. 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


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.