Bugzilla – Attachment 162846 Details for
Bug 36215
Bookings calendar only shows bookings within RESTdefaultPageSize
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36215: Remove limit on fetching bookings
Bug-36215-Remove-limit-on-fetching-bookings.patch (text/plain), 2.67 KB, created by
Nick Clemens (kidclamp)
on 2024-03-06 17:59:41 UTC
(
hide
)
Description:
Bug 36215: Remove limit on fetching bookings
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-03-06 17:59:41 UTC
Size:
2.67 KB
patch
obsolete
>From 98fea1bca4bb91a753825a090e07402b7bdf5bfd Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 6 Mar 2024 17:59:10 +0000 >Subject: [PATCH] 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> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/js/place_booking_modal.js | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt >index a8f51d3e197..83518866900 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt >@@ -81,7 +81,7 @@ > type: 'GET' > }); > var bookings = $.ajax({ >- url: '/api/v1/biblios/[% biblionumber | uri %]/bookings', >+ url: '/api/v1/biblios/[% biblionumber | uri %]/bookings?_per_page=-1', > headers: { 'x-koha-embed': 'patron' }, > dataType: 'json', > type: 'GET', >diff --git a/koha-tmpl/intranet-tmpl/prog/js/place_booking_modal.js b/koha-tmpl/intranet-tmpl/prog/js/place_booking_modal.js >index 946be01e3cd..7118c88afdb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/place_booking_modal.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/place_booking_modal.js >@@ -117,14 +117,14 @@ $('#placeBookingModal').on('show.bs.modal', function(e) { > > // 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', > dataType: 'json', > type: 'GET' > }); > > // Fetch list of existing bookings > let bookingsFetch = $.ajax({ >- url: '/api/v1/bookings?biblio_id=' + biblionumber, >+ url: '/api/v1/bookings?biblio_id=' + biblionumber + '&_per_page=-1', > dataType: 'json', > type: 'GET' > }); >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36215
:
162843
|
162846
|
163051