Skip to content

Fix farthest booking calculation being cut by 1d#1724

Merged
devmount merged 1 commit into
mainfrom
bugs/1719-falsely-available-end-of-notice-period
Jun 24, 2026
Merged

Fix farthest booking calculation being cut by 1d#1724
devmount merged 1 commit into
mainfrom
bugs/1719-falsely-available-end-of-notice-period

Conversation

@devmount

@devmount devmount commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

What changed?

This change fixes a bug where the last day of an availability time window wasn't considered for remote event retrieval.

How to test

  1. Have remote events at the last day of the configured booking window (e.g. if the window is 7d, have events at that exact day).
  2. Don't checkout this branch yet and go to your bookers page and see, that the last day in the booking window is completely bookable
  3. Now checkout this branch and reload the bookers page
  4. See that there are blockers now on the last available day where the remote events are

Why?

Prevention of bookings at potentially already blocked times.

Limitations and Notes

It would be good to have tests for those event edge cases.

Applicable Issues

Closes #1719

Screenshots

None

@devmount devmount self-assigned this Jun 24, 2026

@davinotdavid davinotdavid left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm, I don't see this problem happening in the main branch? Here's what I did to try to reproduce:

I've changed my Availability to 7 days and I have tried with all day events and regular events and it still shows blocked (correct) in the booking page 🤔

@rwood-moz

rwood-moz commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Hmm, I don't see this problem happening in the main branch? Here's what I did to try to reproduce:

I've changed my Availability to 7 days and I have tried with all day events and regular events and it still shows blocked (correct) in the booking page 🤔

I was able to reproduce this on main, but I have my Availability set to 14 days. On main on the 14th day of availability my existing remote appointment is not blocked off on my bookee page:

Screenshot 2026-06-24 at 1 27 28 PM

But when I switched to this branch the remote appointment time is now blocked out on my bookee page, so I see your fix worked for my case:

Screenshot 2026-06-24 at 1 30 32 PM

@devmount

Copy link
Copy Markdown
Collaborator Author

@davinotdavid: I've changed my Availability to 7 days and I have tried with all day events and regular events and it still shows blocked (correct) in the booking page 🤔

Well that's interesting. The 7th day shows correctly blocked events? What happens if you switch to 14 and look at the last day?

@rwood-moz: But when I switched to this branch the remote appointment time is now blocked out on my bookee page, so I see your fix worked for my case:

Good to know that you could reproduce that Rob. So it seems to only happen to some, there might be another variable at play here I'm not aware of 😅

@davinotdavid davinotdavid left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Interesting. I was able to reproduce this only with the 14-day availability block somehow. There might be something move to this but I'd say we can give this a try since it is an improvement over the previous code. Thanks!

@devmount devmount merged commit b784b5e into main Jun 24, 2026
8 checks passed
@devmount devmount deleted the bugs/1719-falsely-available-end-of-notice-period branch June 24, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Changing the booking notice causes inappropriate availability

3 participants