If a record has more bookings than the system preference RESTdefaultPageSize they will not appear in the calendar
Created attachment 162843 [details] [review] Bug 36215: Remove limit on fetching bookings This removes the paging from the bookings request so we take into account all bookings. We may want to replace this with date bounded paging in the future, but lets not try to optimise until we need to.
Created attachment 162846 [details] [review] Bug 36215: Remove limit on fetching bookings This removes the paging from the bookings request so we take into account all bookings. We may want to replace this with date bounded paging in the future, but lets not try to optimise until we need to. To test: 1 - Find a record detail page in Koha staff interface 2 - Click on a barcode to go to items tab 3 - Edit 'bookable' to 'yes' 4 - Return to details page 5 - Place 5 bookings on a record 6 - Set system preference RESTDefaultPageSize 2 7 - Click the 'Bookings' tab on the record details 8 - Confirm onyl 2 bookings shown in calendar view 9 - Apply patch, reload 10 - All bookings now show in calendar Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Redid the patch to add param with '?' and not '&' :-) Minor change, works, can go straight to QA
Created attachment 163051 [details] [review] Bug 36215: Remove limit on fetching bookings This removes the paging from the bookings request so we take into account all bookings. We may want to replace this with date bounded paging in the future, but lets not try to optimise until we need to. To test: 1 - Find a record detail page in Koha staff interface 2 - Click on a barcode to go to items tab 3 - Edit 'bookable' to 'yes' 4 - Return to details page 5 - Place 5 bookings on a record 6 - Set system preference RESTDefaultPageSize 2 7 - Click the 'Bookings' tab on the record details 8 - Confirm onyl 2 bookings shown in calendar view 9 - Apply patch, reload 10 - All bookings now show in calendar Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pushed for 24.05! Well done everyone, thank you!
Ah sure about this change ? // Fetch list of bookable items let itemsFetch = $.ajax({ - url: '/api/v1/biblios/' + biblionumber + '/items?bookable=1' + '&_per_page=-1', + url: '/api/v1/biblios/' + biblionumber + '/items?bookable=1' + '?_per_page=-1', Looks like it will generate two question mark: url: '/api/v1/biblios/9999/items?bookable=1?_per_page=-1'
Will push the follow-up to master in a bit.
Pushed to 23.11.x for 23.11.04
I see there is a follwup in master : Bug 36215: (QA follow-up) Fix &? confusion Backported to 23.11.x
I could have sworn Nick already fixed that inline during QA.. clearly we missed a second case between us!