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

Max weeks to 48 is not enforced #472

Closed
JocelynDelalande opened this issue Jan 10, 2024 · 4 comments
Closed

Max weeks to 48 is not enforced #472

JocelynDelalande opened this issue Jan 10, 2024 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@JocelynDelalande
Copy link
Contributor

JocelynDelalande commented Jan 10, 2024

Steps to reproduce :

  1. Configure a form in external mode with 48 weeks visibility
  2. Try to book an appointment

What is expected ?

As of now (10/1/2024) I should be able to book for slots up to next december 2024

What happens ?

I can only go as far as may 2024 (~18 weeks)

image

Context

  • Appointments app v1.15.3
  • NextCloud 26.0.7
  • Contributor key
@JocelynDelalande
Copy link
Contributor Author

I can confirm it's ~18 weeks ahead. As of now we can book up to May 23th.

@SergeyMosin
Copy link
Owner

The bug(regression) is actually here:

$c++;
if ($c > 128) {
break;
}

In External Mode there is a limit of 128 appointments per request, this limit was not adjusted when 32,40,48 weeks visibilities were added.

This will be fixed in v2, as it will have a different API for fetching available appointments.

Thank you for the report.

@SergeyMosin SergeyMosin added the bug Something isn't working label Jan 16, 2024
@SergeyMosin SergeyMosin added this to the V2 milestone Jan 16, 2024
@JocelynDelalande
Copy link
Contributor Author

Thanks for the detailed answer :).

Meanwhile, would a patch that manually raises the limit to something higher (512 ?) in the code do the job ?

@SergeyMosin
Copy link
Owner

Fixed in v2.1.12

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

2 participants