Appointments icon indicating copy to clipboard operation
Appointments copied to clipboard

Max weeks to 48 is not enforced

Open JocelynDelalande opened this issue 1 year ago • 3 comments

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 avatar Jan 10 '24 18:01 JocelynDelalande

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

JocelynDelalande avatar Jan 16 '24 16:01 JocelynDelalande

The bug(regression) is actually here: https://github.com/SergeyMosin/Appointments/blob/a13534f309ccdb2742f9969491807a06151c0c01/lib/Backend/BCSabreImpl.php#L301-L304 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 avatar Jan 16 '24 18:01 SergeyMosin

Thanks for the detailed answer :).

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

JocelynDelalande avatar Jan 18 '24 14:01 JocelynDelalande