Currently, there's no way to set where a booking is intended to be collected from.
*** Bug 36121 has been marked as a duplicate of this bug. ***
Created attachment 162911 [details] [review] Bug 36120: Add pickup_items to the pickup_locations response This patch adds pickup_items as a list of itemnumbers that can be picked from the library should it be selected as a pickup location.
Created attachment 162912 [details] [review] Bug 36120: Add pickup locations to bookings This patch adds a call to /biblios/biblionumber/pickup_locations to fetch valid pickup locations for the biblio. Upon selecting a pickup location we adapt the item select to only allow for selecting items returned as valid for pickup at the selected location.
Still a lot to tie in here, but I wanted to put up the UI proof of concept to start facilitating feedback from Tomas and people regarding the calls to fetch pickup locations from the API.
I've not considered overrides really yet either.
Created attachment 162914 [details] [review] Bug 36120: Schema update
Created attachment 162915 [details] [review] Bug 36120: Add pickup_items to the pickup_locations response This patch adds pickup_items as a list of itemnumbers that can be picked from the library should it be selected as a pickup location.
Created attachment 162916 [details] [review] Bug 36120: Add pickup_library support to bookings API
Created attachment 162917 [details] [review] Bug 36120: Add pickup locations to place bookings modal This patch adds a call to /biblios/biblionumber/pickup_locations to fetch valid pickup locations for the biblio. Upon selecting a pickup location we adapt the item select to only allow for selecting items returned as valid for pickup at the selected location.
Created attachment 162918 [details] [review] Bug 36120: Add pickup_library_id to bookings table
Created attachment 162919 [details] [review] Bug 36120: Schema update
Created attachment 162920 [details] [review] Bug 36120: Add pickup_items to the pickup_locations response This patch adds pickup_items as a list of itemnumbers that can be picked from the library should it be selected as a pickup location.
Created attachment 162921 [details] [review] Bug 36120: Add pickup_library support to bookings API
Created attachment 162922 [details] [review] Bug 36120: Add pickup locations to place bookings modal This patch adds a call to /biblios/biblionumber/pickup_locations to fetch valid pickup locations for the biblio. Upon selecting a pickup location we adapt the item select to only allow for selecting items returned as valid for pickup at the selected location.
Created attachment 162923 [details] [review] Bug 36120: Add pickup_library_id to bookings table
Created attachment 162924 [details] [review] Bug 36120: Schema update
Created attachment 162925 [details] [review] Bug 36120: Add pickup_items to the pickup_locations response This patch adds pickup_items as a list of itemnumbers that can be picked from the library should it be selected as a pickup location.
Created attachment 162926 [details] [review] Bug 36120: Add pickup_library support to bookings API
Created attachment 162927 [details] [review] Bug 36120: Add pickup locations to place bookings modal This patch adds a call to /biblios/biblionumber/pickup_locations to fetch valid pickup locations for the biblio. Upon selecting a pickup location we adapt the item select to only allow for selecting items returned as valid for pickup at the selected location.
Created attachment 162928 [details] [review] Bug 36120: Add pickup library to bookings list table
OK, ready for testing now as a whole :) Test plan 1) Enable some items to be bookable as per the test plan for 29002 2) Click 'Place booking' on any of the biblio pages for those bilios marked bookable as above 3) Note you are now required to pick a pickup location 4) Experiment with different pickup location rules as per the holds system 5) Note that items are enabled/disabled from the item selection based on pickup location 6) Place your booking 7) Note that 'Pickup location' is now listed in the table on the 'Bookings' page.
Created attachment 162976 [details] [review] Bug 36120: Ensure existing bookings are assigned a pickup library
I can't apply one of the dependencies: Applying: Bug 35787: Remove Koha::Template::Plugin::Biblio::CanBook error: sha1 information is lacking or useless (Koha/Template/Plugin/Biblio.pm). error: could not build fake ancestor Patch failed at 0001 Bug 35787: Remove Koha::Template::Plugin::Biblio::CanBook
For me, it was bug 35788 that was not applying with sha1/fake ancestor error: ... Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 35788: Remove Koha::Template::Plugin::Biblio::BookingsCount error: sha1 information is lacking or useless (Koha/Template/Plugin/Biblio.pm). error: could not build fake ancestor Patch failed at 0001 Bug 35788: Remove Koha::Template::Plugin::Biblio::BookingsCount
https://github.com/PTFS-Europe/koha/tree/bug_36120
Signed off, worked great!
Created attachment 163218 [details] [review] Bug 36120: Add pickup_library_id to bookings table Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com>
Created attachment 163219 [details] [review] Bug 36120: Schema update Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com>
Created attachment 163220 [details] [review] Bug 36120: Add pickup_items to the pickup_locations response This patch adds pickup_items as a list of itemnumbers that can be picked from the library should it be selected as a pickup location. Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com>
Created attachment 163221 [details] [review] Bug 36120: Add pickup_library support to bookings API Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com>
Created attachment 163222 [details] [review] Bug 36120: Add pickup locations to place bookings modal This patch adds a call to /biblios/biblionumber/pickup_locations to fetch valid pickup locations for the biblio. Upon selecting a pickup location we adapt the item select to only allow for selecting items returned as valid for pickup at the selected location. Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com>
Created attachment 163223 [details] [review] Bug 36120: Add pickup library to bookings list table Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com>
Created attachment 163224 [details] [review] Bug 36120: Ensure existing bookings are assigned a pickup library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com>
Rebased and added Lisette's signoff lines.
For Martin: CCPL reviewed a video Lisette made of the pickup location option, and it looked as expected.
Excellent, thanks Kristi :)
Created attachment 163435 [details] [review] Bug 36120: Add pickup_library_id to bookings table Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163436 [details] [review] Bug 36120: Schema update Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163437 [details] [review] Bug 36120: Add pickup_items to the pickup_locations response This patch adds pickup_items as a list of itemnumbers that can be picked from the library should it be selected as a pickup location. Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163438 [details] [review] Bug 36120: Add pickup_library support to bookings API Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163439 [details] [review] Bug 36120: Add pickup locations to place bookings modal This patch adds a call to /biblios/biblionumber/pickup_locations to fetch valid pickup locations for the biblio. Upon selecting a pickup location we adapt the item select to only allow for selecting items returned as valid for pickup at the selected location. Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163440 [details] [review] Bug 36120: Add pickup library to bookings list table Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163441 [details] [review] Bug 36120: Ensure existing bookings are assigned a pickup library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163442 [details] [review] Bug 36120: Add pickup_library_id to bookings table Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163443 [details] [review] Bug 36120: Schema update Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163444 [details] [review] Bug 36120: Add pickup_items to the pickup_locations response This patch adds pickup_items as a list of itemnumbers that can be picked from the library should it be selected as a pickup location. Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163445 [details] [review] Bug 36120: Add pickup_library support to bookings API Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163446 [details] [review] Bug 36120: Add pickup locations to place bookings modal This patch adds a call to /biblios/biblionumber/pickup_locations to fetch valid pickup locations for the biblio. Upon selecting a pickup location we adapt the item select to only allow for selecting items returned as valid for pickup at the selected location. Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163447 [details] [review] Bug 36120: Add pickup library to bookings list table Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163448 [details] [review] Bug 36120: Ensure existing bookings are assigned a pickup library Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Credit where credits are due.. I added the Sponsored-by lines to the commits having forgotten until now.
Created attachment 163565 [details] [review] Bug 36120: Add pickup_library_id to bookings table Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163566 [details] [review] Bug 36120: Schema update Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163567 [details] [review] Bug 36120: Add pickup_items to the pickup_locations response This patch adds pickup_items as a list of itemnumbers that can be picked from the library should it be selected as a pickup location. Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163568 [details] [review] Bug 36120: Add pickup_library support to bookings API Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163569 [details] [review] Bug 36120: Add pickup locations to place bookings modal This patch adds a call to /biblios/biblionumber/pickup_locations to fetch valid pickup locations for the biblio. Upon selecting a pickup location we adapt the item select to only allow for selecting items returned as valid for pickup at the selected location. Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163570 [details] [review] Bug 36120: Add pickup library to bookings list table Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163571 [details] [review] Bug 36120: Ensure existing bookings are assigned a pickup library Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Just a rebase on the tidy up bug.
This works great in a lot of ways, but I found a couple issues: 1 - We need unit tests for the pickup_locations change and the API 2 - The pickup_locations for items should be set from the list for that item, not from the entire bib so far: for my $location (@pickup_locations) { should be for my $location (@{$item_pickup_locations}) { 3 - When changing branches, item options are disabled - if there are 100+ items you may have to scroll through all the disabled options to find the correct one 4 - If you click on any single item, the 'Any item' option is disabled and cannot be chosen again 5 - The pickup_library_id is defaulted to NULL - it should be NOT NULL to match hold pickup location
Created attachment 163603 [details] [review] Bug 36120: Add pickup_library_id to bookings table Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163604 [details] [review] Bug 36120: Schema update Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163605 [details] [review] Bug 36120: Add pickup_items to the pickup_locations response This patch adds pickup_items as a list of itemnumbers that can be picked from the library should it be selected as a pickup location. Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163606 [details] [review] Bug 36120: Add pickup_library support to bookings API Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163607 [details] [review] Bug 36120: Add pickup locations to place bookings modal This patch adds a call to /biblios/biblionumber/pickup_locations to fetch valid pickup locations for the biblio. Upon selecting a pickup location we adapt the item select to only allow for selecting items returned as valid for pickup at the selected location. Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163608 [details] [review] Bug 36120: Add pickup library to bookings list table Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163609 [details] [review] Bug 36120: Ensure existing bookings are assigned a pickup library Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 163610 [details] [review] Bug 36120: Ensure pickup_library_id is NOT NULL This patch updates the database schema to ensure bookings.pickup_library_id is NOT NULL
Created attachment 163611 [details] [review] Bug 36120: Schema update
Created attachment 163612 [details] [review] Bug 36120: Add unit test for pickup_library relation accessor This patch adds a unit test for the newly introduced pickup_library accessor added to Koha::Booking
Created attachment 163613 [details] [review] Bug 36120: Unit tests for pickup_locations change This patch adds unit tests for the additional caching of location_items in the pickup_locations method of Koha::Biblio.
(In reply to Nick Clemens from comment #60) > This works great in a lot of ways, but I found a couple issues: > 1 - We need unit tests for the pickup_locations change and the API API tests next to come, but Koha::Biblio and Koha::Booking tests are now covered > 2 - The pickup_locations for items should be set from the list for that > item, not from the entire bib so far: > for my $location (@pickup_locations) { > should be > for my $location (@{$item_pickup_locations}) { Good spot, corrected. > 5 - The pickup_library_id is defaulted to NULL - it should be NOT NULL to > match hold pickup location Resolved now Still working on comments 3 and 4
Created attachment 163635 [details] [review] Bug 36120: Re-enable 'Any item' selectable
Created attachment 163636 [details] [review] Bug 36120: Account for both pickup_location and date selection in items This patch ensures we account for both pickup location and date selections having taken place before an item selection is pondered. We now correctly disable item options given both conditions rather than it being a race between the two.
(In reply to Nick Clemens from comment #60) > 3 - When changing branches, item options are disabled - if there are 100+ > items you may have to scroll through all the disabled options to find the > correct one Can we put this one on a follow-up bug.. it pre-exists this bug (selecting dates and then trying to select item also disables but available items but doesn't re-order the select list) > 4 - If you click on any single item, the 'Any item' option is disabled and > cannot be chosen again This is resolved too There's also a follow-up for something I spotted when digging more deeply.. we now account for the dates AND pickup locations in combination when disabling item options.. prior to that last patch we had a race condition where the most recent selected option would govern which items could be selected rather than both working in combination.
The one remaining issue I am seeing is that changing the pickup location disables all the items in the items drop down, however, it retains whatever my last selection was, so I can place the booking anyways, but can't select a new item, 'Any item' can be disabled too If i update the booking dates, then some items can be enabled again
Created attachment 165140 [details] [review] Bug 36120: Account for both pickup_location and date selection in items This patch ensures we account for both pickup location and date selections having taken place before an item selection is pondered. We now correctly disable item options given both conditions rather than it being a race between the two.
Seems I missed part of the the last commit last upload.. squashed and uploaded it again.. that should resolve your issue Nick
Created attachment 165175 [details] [review] Bug 36120: Add pickup_library_id to bookings table Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 165176 [details] [review] Bug 36120: Schema update Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 165177 [details] [review] Bug 36120: Add pickup_items to the pickup_locations response This patch adds pickup_items as a list of itemnumbers that can be picked from the library should it be selected as a pickup location. Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 165178 [details] [review] Bug 36120: Add pickup_library support to bookings API Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 165179 [details] [review] Bug 36120: Add pickup locations to place bookings modal This patch adds a call to /biblios/biblionumber/pickup_locations to fetch valid pickup locations for the biblio. Upon selecting a pickup location we adapt the item select to only allow for selecting items returned as valid for pickup at the selected location. Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 165180 [details] [review] Bug 36120: Add pickup library to bookings list table Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 165181 [details] [review] Bug 36120: Ensure existing bookings are assigned a pickup library Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Created attachment 165182 [details] [review] Bug 36120: Ensure pickup_library_id is NOT NULL This patch updates the database schema to ensure bookings.pickup_library_id is NOT NULL
Created attachment 165183 [details] [review] Bug 36120: Schema update
Created attachment 165184 [details] [review] Bug 36120: Add unit test for pickup_library relation accessor This patch adds a unit test for the newly introduced pickup_library accessor added to Koha::Booking
Created attachment 165185 [details] [review] Bug 36120: Unit tests for pickup_locations change This patch adds unit tests for the additional caching of location_items in the pickup_locations method of Koha::Biblio.
Created attachment 165186 [details] [review] Bug 36120: Re-enable 'Any item' selectable
Created attachment 165187 [details] [review] Bug 36120: Account for both pickup_location and date selection in items This patch ensures we account for both pickup location and date selections having taken place before an item selection is pondered. We now correctly disable item options given both conditions rather than it being a race between the two.
Created attachment 165188 [details] [review] Bug 36120: Ensure pickup location and item can be picked in either order
Created attachment 165214 [details] [review] Bug 36120: (follow-up) Only display locations for bookable items This patch updates the pickup locations picker to only include locations for items that are bookable. We should look at doing this on the API level as it highlights some issues with re-using item holds pickup location rules.
Created attachment 165215 [details] [review] Bug 36120: Restore edit
Created attachment 165216 [details] [review] Bug 36120: Restore edit
Created attachment 165419 [details] [review] Bug 36120: Add pickup_library_id to bookings table Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165420 [details] [review] Bug 36120: Schema update Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165421 [details] [review] Bug 36120: Add pickup_items to the pickup_locations response This patch adds pickup_items as a list of itemnumbers that can be picked from the library should it be selected as a pickup location. Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165422 [details] [review] Bug 36120: Add pickup_library support to bookings API Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165423 [details] [review] Bug 36120: Add pickup locations to place bookings modal This patch adds a call to /biblios/biblionumber/pickup_locations to fetch valid pickup locations for the biblio. Upon selecting a pickup location we adapt the item select to only allow for selecting items returned as valid for pickup at the selected location. Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165424 [details] [review] Bug 36120: Add pickup library to bookings list table Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165425 [details] [review] Bug 36120: Ensure existing bookings are assigned a pickup library Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165426 [details] [review] Bug 36120: Ensure pickup_library_id is NOT NULL This patch updates the database schema to ensure bookings.pickup_library_id is NOT NULL Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165427 [details] [review] Bug 36120: Schema update Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165428 [details] [review] Bug 36120: Add unit test for pickup_library relation accessor This patch adds a unit test for the newly introduced pickup_library accessor added to Koha::Booking Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165429 [details] [review] Bug 36120: Unit tests for pickup_locations change This patch adds unit tests for the additional caching of location_items in the pickup_locations method of Koha::Biblio. Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165430 [details] [review] Bug 36120: Re-enable 'Any item' selectable Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165431 [details] [review] Bug 36120: Account for both pickup_location and date selection in items This patch ensures we account for both pickup location and date selections having taken place before an item selection is pondered. We now correctly disable item options given both conditions rather than it being a race between the two. Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165432 [details] [review] Bug 36120: Ensure pickup location and item can be picked in either order Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165433 [details] [review] Bug 36120: (follow-up) Only display locations for bookable items This patch updates the pickup locations picker to only include locations for items that are bookable. We should look at doing this on the API level as it highlights some issues with re-using item holds pickup location rules. Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165434 [details] [review] Bug 36120: Restore edit Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165435 [details] [review] Bug 36120: (QA follow-up) Tidy Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
t/db_dependent/api/v1/biblios.t -s failing after these patch sets
Also: t/db_dependent/Circulation.t t/db_dependent/api/v1/bookings.t
Created attachment 165984 [details] [review] Bug 36120: Add pickup_library_id to bookings table Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165985 [details] [review] Bug 36120: Schema update Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165986 [details] [review] Bug 36120: Add pickup_items to the pickup_locations response This patch adds pickup_items as a list of itemnumbers that can be picked from the library should it be selected as a pickup location. Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165987 [details] [review] Bug 36120: Add pickup_library support to bookings API Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165988 [details] [review] Bug 36120: Add pickup locations to place bookings modal This patch adds a call to /biblios/biblionumber/pickup_locations to fetch valid pickup locations for the biblio. Upon selecting a pickup location we adapt the item select to only allow for selecting items returned as valid for pickup at the selected location. Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165989 [details] [review] Bug 36120: Add pickup library to bookings list table Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165990 [details] [review] Bug 36120: Ensure existing bookings are assigned a pickup library Sponsored-by: Cuyahoga County Public Library Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165991 [details] [review] Bug 36120: Ensure pickup_library_id is NOT NULL This patch updates the database schema to ensure bookings.pickup_library_id is NOT NULL Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165992 [details] [review] Bug 36120: Schema update Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165993 [details] [review] Bug 36120: Add unit test for pickup_library relation accessor This patch adds a unit test for the newly introduced pickup_library accessor added to Koha::Booking Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165994 [details] [review] Bug 36120: Unit tests for pickup_locations change This patch adds unit tests for the additional caching of location_items in the pickup_locations method of Koha::Biblio. Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165995 [details] [review] Bug 36120: Re-enable 'Any item' selectable Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165996 [details] [review] Bug 36120: Account for both pickup_location and date selection in items This patch ensures we account for both pickup location and date selections having taken place before an item selection is pondered. We now correctly disable item options given both conditions rather than it being a race between the two. Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165997 [details] [review] Bug 36120: Ensure pickup location and item can be picked in either order Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165998 [details] [review] Bug 36120: (follow-up) Only display locations for bookable items This patch updates the pickup locations picker to only include locations for items that are bookable. We should look at doing this on the API level as it highlights some issues with re-using item holds pickup location rules. Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 165999 [details] [review] Bug 36120: Restore edit Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 166000 [details] [review] Bug 36120: (QA follow-up) Fix /biblios.t unit test This patch adds some mock data for pickup_items getting included in the pickup locations response. Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 166001 [details] [review] Bug 36120: (QA follow-up) Fix Circulation.t We now require pickup_library_id and so need to update the unit tests to reflect that for our sample bookings Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 166002 [details] [review] Bug 36120: (QA follow-up) Fix api/v1/bookings.t We now require pickup_library_id and so need to update the unit tests to reflect that for our sample bookings Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Tests all passing now and full set rebased.
Pushed for 24.05! Well done everyone, thank you!
Not backported to 23.11.x