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

Slot interval being removed crashes customer's bookings #816

Open
ikusteu opened this issue Sep 11, 2023 · 1 comment
Open

Slot interval being removed crashes customer's bookings #816

ikusteu opened this issue Sep 11, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@ikusteu
Copy link
Collaborator

ikusteu commented Sep 11, 2023

Steps to reproduce:

  • create a slot with two intervals (e.g. "08:00-09:00" and "08:00-09:30")
  • create a customer and book an interval (e.g. "08:00-09:00")
  • edit the slot to remove the interval the customer had booked ("08:00-09:00" in this case)
  • bug1:
    • go to customer's bookings page and click "Calendar"
    • the page crashes: the calendar wants to show the booking, but can't find the same interval in the respective slot (as it's been deleted)
  • bug2:
    • go to the attendance page and navigate to the slot
    • the customer's attendance shows the deleted interval (it shouldn't)

I don't have a direct solution. We can either:

  • block deletion of already booked intervals
  • add a data trigger to remove the bookings of deleted interval
  • add additional (complex) data flow where the admin is prompted to confirm the deletion of the interval if it's already booked and customers are notified that the interval has been deleted

All of the aforementioned solutions open a respective can of worms...

@ikusteu ikusteu added the bug Something isn't working label Sep 11, 2023
@ikusteu
Copy link
Collaborator Author

ikusteu commented Sep 11, 2023

Thinking about this, maybe we could simply not display the mismatched slots, have a cron job -> scheduled cloud function run once a day (at midnight...as is, of course the tradition) to check mismatches, clean them up and send emails, notifying the customers that the interval/booking has been cancelled.

Additional can of worms: What happens when the interval has been changed/deleted and customers no longer have booking permissions...should the dates be automatically extended?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant