Bug 36120 - Add pickup locations to bookings
Summary: Add pickup locations to bookings
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Martin Renvoize (ashimema)
QA Contact: Nick Clemens (kidclamp)
URL:
Keywords:
: 36121 (view as bug list)
Depends on: 35248
Blocks: 34440 37000
  Show dependency treegraph
 
Reported: 2024-02-16 16:26 UTC by Martin Renvoize (ashimema)
Modified: 2025-01-03 18:03 UTC (History)
11 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact: Aude Charillon
Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/1009
Text to go in the release notes:
This enhancement adds the requirement to pick a pickup location when placing a booking.
Version(s) released in:
24.05.00
Circulation function:


Attachments
Bug 36120: Add pickup_items to the pickup_locations response (3.09 KB, patch)
2024-03-07 16:32 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup locations to bookings (5.64 KB, patch)
2024-03-07 16:32 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Schema update (3.12 KB, patch)
2024-03-07 17:22 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_items to the pickup_locations response (3.09 KB, patch)
2024-03-07 17:22 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_library support to bookings API (2.19 KB, patch)
2024-03-07 17:22 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup locations to place bookings modal (7.44 KB, patch)
2024-03-07 17:22 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_library_id to bookings table (3.23 KB, patch)
2024-03-07 17:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Schema update (3.12 KB, patch)
2024-03-07 17:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_items to the pickup_locations response (3.09 KB, patch)
2024-03-07 17:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_library support to bookings API (2.19 KB, patch)
2024-03-07 17:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup locations to place bookings modal (7.44 KB, patch)
2024-03-07 17:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_library_id to bookings table (3.23 KB, patch)
2024-03-07 17:35 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Schema update (3.12 KB, patch)
2024-03-07 17:35 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_items to the pickup_locations response (3.09 KB, patch)
2024-03-07 17:35 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_library support to bookings API (3.33 KB, patch)
2024-03-07 17:35 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup locations to place bookings modal (7.44 KB, patch)
2024-03-07 17:36 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup library to bookings list table (1.39 KB, patch)
2024-03-07 17:36 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Ensure existing bookings are assigned a pickup library (912 bytes, patch)
2024-03-08 16:35 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_library_id to bookings table (3.30 KB, patch)
2024-03-15 12:01 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Schema update (3.18 KB, patch)
2024-03-15 12:01 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_items to the pickup_locations response (3.15 KB, patch)
2024-03-15 12:01 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_library support to bookings API (3.40 KB, patch)
2024-03-15 12:01 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup locations to place bookings modal (7.56 KB, patch)
2024-03-15 12:01 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup library to bookings list table (1.46 KB, patch)
2024-03-15 12:01 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Ensure existing bookings are assigned a pickup library (980 bytes, patch)
2024-03-15 12:01 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_library_id to bookings table (3.36 KB, patch)
2024-03-19 14:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Schema update (3.24 KB, patch)
2024-03-19 14:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_items to the pickup_locations response (3.21 KB, patch)
2024-03-19 14:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_library support to bookings API (3.46 KB, patch)
2024-03-19 14:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup locations to place bookings modal (7.62 KB, patch)
2024-03-19 14:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup library to bookings list table (1.52 KB, patch)
2024-03-19 14:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Ensure existing bookings are assigned a pickup library (1.02 KB, patch)
2024-03-19 14:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_library_id to bookings table (3.40 KB, patch)
2024-03-19 14:33 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Schema update (3.29 KB, patch)
2024-03-19 14:33 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_items to the pickup_locations response (3.26 KB, patch)
2024-03-19 14:33 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_library support to bookings API (3.50 KB, patch)
2024-03-19 14:33 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup locations to place bookings modal (7.66 KB, patch)
2024-03-19 14:33 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup library to bookings list table (1.56 KB, patch)
2024-03-19 14:34 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Ensure existing bookings are assigned a pickup library (1.06 KB, patch)
2024-03-19 14:34 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_library_id to bookings table (3.40 KB, patch)
2024-03-20 16:50 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Schema update (3.29 KB, patch)
2024-03-20 16:50 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_items to the pickup_locations response (3.26 KB, patch)
2024-03-20 16:50 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_library support to bookings API (3.50 KB, patch)
2024-03-20 16:50 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup locations to place bookings modal (7.75 KB, patch)
2024-03-20 16:50 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup library to bookings list table (1.56 KB, patch)
2024-03-20 16:50 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Ensure existing bookings are assigned a pickup library (1.06 KB, patch)
2024-03-20 16:50 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_library_id to bookings table (3.40 KB, patch)
2024-03-21 12:55 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Schema update (3.29 KB, patch)
2024-03-21 12:55 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_items to the pickup_locations response (4.13 KB, patch)
2024-03-21 12:55 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_library support to bookings API (3.50 KB, patch)
2024-03-21 12:55 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup locations to place bookings modal (7.75 KB, patch)
2024-03-21 12:55 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup library to bookings list table (1.56 KB, patch)
2024-03-21 12:55 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Ensure existing bookings are assigned a pickup library (1.06 KB, patch)
2024-03-21 12:55 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Ensure pickup_library_id is NOT NULL (3.36 KB, patch)
2024-03-21 12:55 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Schema update (1.82 KB, patch)
2024-03-21 12:55 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add unit test for pickup_library relation accessor (9.14 KB, patch)
2024-03-21 12:55 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Unit tests for pickup_locations change (5.39 KB, patch)
2024-03-21 12:55 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Re-enable 'Any item' selectable (1.08 KB, patch)
2024-03-21 15:38 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Account for both pickup_location and date selection in items (3.76 KB, patch)
2024-03-21 15:38 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Account for both pickup_location and date selection in items (4.23 KB, patch)
2024-04-18 15:58 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_library_id to bookings table (3.40 KB, patch)
2024-04-19 13:33 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Schema update (2.88 KB, patch)
2024-04-19 13:33 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_items to the pickup_locations response (4.13 KB, patch)
2024-04-19 13:33 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_library support to bookings API (3.50 KB, patch)
2024-04-19 13:33 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup locations to place bookings modal (7.75 KB, patch)
2024-04-19 13:33 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup library to bookings list table (1.56 KB, patch)
2024-04-19 13:33 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Ensure existing bookings are assigned a pickup library (1.06 KB, patch)
2024-04-19 13:33 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Ensure pickup_library_id is NOT NULL (3.36 KB, patch)
2024-04-19 13:33 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Schema update (1.82 KB, patch)
2024-04-19 13:33 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add unit test for pickup_library relation accessor (9.14 KB, patch)
2024-04-19 13:33 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Unit tests for pickup_locations change (5.39 KB, patch)
2024-04-19 13:34 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Re-enable 'Any item' selectable (1.08 KB, patch)
2024-04-19 13:34 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Account for both pickup_location and date selection in items (4.23 KB, patch)
2024-04-19 13:34 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Ensure pickup location and item can be picked in either order (10.15 KB, patch)
2024-04-19 13:34 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: (follow-up) Only display locations for bookable items (5.81 KB, patch)
2024-04-19 15:22 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Restore edit (3.88 KB, patch)
2024-04-19 15:40 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Restore edit (4.63 KB, patch)
2024-04-19 15:50 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_library_id to bookings table (3.46 KB, patch)
2024-04-23 17:42 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 36120: Schema update (2.93 KB, patch)
2024-04-23 17:42 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 36120: Add pickup_items to the pickup_locations response (4.19 KB, patch)
2024-04-23 17:42 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 36120: Add pickup_library support to bookings API (3.56 KB, patch)
2024-04-23 17:42 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 36120: Add pickup locations to place bookings modal (7.80 KB, patch)
2024-04-23 17:42 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 36120: Add pickup library to bookings list table (1.62 KB, patch)
2024-04-23 17:42 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 36120: Ensure existing bookings are assigned a pickup library (1.12 KB, patch)
2024-04-23 17:42 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 36120: Ensure pickup_library_id is NOT NULL (3.41 KB, patch)
2024-04-23 17:42 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 36120: Schema update (1.88 KB, patch)
2024-04-23 17:42 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 36120: Add unit test for pickup_library relation accessor (9.19 KB, patch)
2024-04-23 17:42 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 36120: Unit tests for pickup_locations change (5.45 KB, patch)
2024-04-23 17:42 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 36120: Re-enable 'Any item' selectable (1.13 KB, patch)
2024-04-23 17:42 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 36120: Account for both pickup_location and date selection in items (4.28 KB, patch)
2024-04-23 17:42 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 36120: Ensure pickup location and item can be picked in either order (10.21 KB, patch)
2024-04-23 17:42 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 36120: (follow-up) Only display locations for bookable items (5.87 KB, patch)
2024-04-23 17:42 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 36120: Restore edit (4.69 KB, patch)
2024-04-23 17:42 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 36120: (QA follow-up) Tidy (4.88 KB, patch)
2024-04-23 17:42 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 36120: Add pickup_library_id to bookings table (3.46 KB, patch)
2024-05-01 15:03 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Schema update (2.93 KB, patch)
2024-05-01 15:03 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_items to the pickup_locations response (4.19 KB, patch)
2024-05-01 15:03 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup_library support to bookings API (3.56 KB, patch)
2024-05-01 15:03 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup locations to place bookings modal (7.80 KB, patch)
2024-05-01 15:03 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add pickup library to bookings list table (1.62 KB, patch)
2024-05-01 15:03 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Ensure existing bookings are assigned a pickup library (1.12 KB, patch)
2024-05-01 15:03 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Ensure pickup_library_id is NOT NULL (4.31 KB, patch)
2024-05-01 15:03 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Schema update (1.88 KB, patch)
2024-05-01 15:03 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Add unit test for pickup_library relation accessor (9.19 KB, patch)
2024-05-01 15:03 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Unit tests for pickup_locations change (5.45 KB, patch)
2024-05-01 15:03 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Re-enable 'Any item' selectable (1.13 KB, patch)
2024-05-01 15:03 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Account for both pickup_location and date selection in items (4.28 KB, patch)
2024-05-01 15:03 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Ensure pickup location and item can be picked in either order (10.21 KB, patch)
2024-05-01 15:03 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: (follow-up) Only display locations for bookable items (5.87 KB, patch)
2024-05-01 15:04 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: Restore edit (6.97 KB, patch)
2024-05-01 15:04 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: (QA follow-up) Fix /biblios.t unit test (2.38 KB, patch)
2024-05-01 15:04 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: (QA follow-up) Fix Circulation.t (3.42 KB, patch)
2024-05-01 15:04 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36120: (QA follow-up) Fix api/v1/bookings.t (5.68 KB, patch)
2024-05-01 15:04 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize (ashimema) 2024-02-16 16:26:01 UTC
Currently, there's no way to set where a booking is intended to be collected from.
Comment 1 Martin Renvoize (ashimema) 2024-02-16 16:27:43 UTC
*** Bug 36121 has been marked as a duplicate of this bug. ***
Comment 2 Martin Renvoize (ashimema) 2024-03-07 16:32:10 UTC Comment hidden (obsolete)
Comment 3 Martin Renvoize (ashimema) 2024-03-07 16:32:13 UTC Comment hidden (obsolete)
Comment 4 Martin Renvoize (ashimema) 2024-03-07 16:42:43 UTC
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.
Comment 5 Martin Renvoize (ashimema) 2024-03-07 16:43:28 UTC
I've not considered overrides really yet either.
Comment 6 Martin Renvoize (ashimema) 2024-03-07 17:22:02 UTC Comment hidden (obsolete)
Comment 7 Martin Renvoize (ashimema) 2024-03-07 17:22:05 UTC Comment hidden (obsolete)
Comment 8 Martin Renvoize (ashimema) 2024-03-07 17:22:07 UTC Comment hidden (obsolete)
Comment 9 Martin Renvoize (ashimema) 2024-03-07 17:22:10 UTC Comment hidden (obsolete)
Comment 10 Martin Renvoize (ashimema) 2024-03-07 17:23:17 UTC Comment hidden (obsolete)
Comment 11 Martin Renvoize (ashimema) 2024-03-07 17:23:19 UTC Comment hidden (obsolete)
Comment 12 Martin Renvoize (ashimema) 2024-03-07 17:23:22 UTC Comment hidden (obsolete)
Comment 13 Martin Renvoize (ashimema) 2024-03-07 17:23:24 UTC Comment hidden (obsolete)
Comment 14 Martin Renvoize (ashimema) 2024-03-07 17:23:27 UTC Comment hidden (obsolete)
Comment 15 Martin Renvoize (ashimema) 2024-03-07 17:35:51 UTC Comment hidden (obsolete)
Comment 16 Martin Renvoize (ashimema) 2024-03-07 17:35:54 UTC Comment hidden (obsolete)
Comment 17 Martin Renvoize (ashimema) 2024-03-07 17:35:56 UTC Comment hidden (obsolete)
Comment 18 Martin Renvoize (ashimema) 2024-03-07 17:35:59 UTC Comment hidden (obsolete)
Comment 19 Martin Renvoize (ashimema) 2024-03-07 17:36:02 UTC Comment hidden (obsolete)
Comment 20 Martin Renvoize (ashimema) 2024-03-07 17:36:04 UTC Comment hidden (obsolete)
Comment 21 Martin Renvoize (ashimema) 2024-03-07 17:40:49 UTC
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.
Comment 22 Martin Renvoize (ashimema) 2024-03-08 16:35:15 UTC
Created attachment 162976 [details] [review]
Bug 36120: Ensure existing bookings are assigned a pickup library
Comment 23 Lisette Scheer 2024-03-08 21:44:08 UTC
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
Comment 24 David Nind 2024-03-09 19:51:17 UTC
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
Comment 25 Martin Renvoize (ashimema) 2024-03-11 08:12:57 UTC
https://github.com/PTFS-Europe/koha/tree/bug_36120
Comment 26 Lisette Scheer 2024-03-12 14:55:57 UTC
Signed off, worked great!
Comment 27 Martin Renvoize (ashimema) 2024-03-15 12:01:40 UTC
Created attachment 163218 [details] [review]
Bug 36120: Add pickup_library_id to bookings table

Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com>
Comment 28 Martin Renvoize (ashimema) 2024-03-15 12:01:44 UTC
Created attachment 163219 [details] [review]
Bug 36120: Schema update

Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com>
Comment 29 Martin Renvoize (ashimema) 2024-03-15 12:01:47 UTC
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>
Comment 30 Martin Renvoize (ashimema) 2024-03-15 12:01:50 UTC
Created attachment 163221 [details] [review]
Bug 36120: Add pickup_library support to bookings API

Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com>
Comment 31 Martin Renvoize (ashimema) 2024-03-15 12:01:53 UTC
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>
Comment 32 Martin Renvoize (ashimema) 2024-03-15 12:01:56 UTC
Created attachment 163223 [details] [review]
Bug 36120: Add pickup library to bookings list table

Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com>
Comment 33 Martin Renvoize (ashimema) 2024-03-15 12:01:59 UTC
Created attachment 163224 [details] [review]
Bug 36120: Ensure existing bookings are assigned a pickup library

Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com>
Comment 34 Martin Renvoize (ashimema) 2024-03-15 12:02:23 UTC
Rebased and added Lisette's signoff lines.
Comment 35 Kristi 2024-03-18 21:14:59 UTC
For Martin: CCPL reviewed a video Lisette made of the pickup location option, and it looked as expected.
Comment 36 Martin Renvoize (ashimema) 2024-03-19 14:20:33 UTC
Excellent, thanks Kristi :)
Comment 37 Martin Renvoize (ashimema) 2024-03-19 14:23:40 UTC Comment hidden (obsolete)
Comment 38 Martin Renvoize (ashimema) 2024-03-19 14:23:43 UTC Comment hidden (obsolete)
Comment 39 Martin Renvoize (ashimema) 2024-03-19 14:23:46 UTC Comment hidden (obsolete)
Comment 40 Martin Renvoize (ashimema) 2024-03-19 14:23:49 UTC Comment hidden (obsolete)
Comment 41 Martin Renvoize (ashimema) 2024-03-19 14:23:52 UTC Comment hidden (obsolete)
Comment 42 Martin Renvoize (ashimema) 2024-03-19 14:23:55 UTC Comment hidden (obsolete)
Comment 43 Martin Renvoize (ashimema) 2024-03-19 14:23:58 UTC Comment hidden (obsolete)
Comment 44 Martin Renvoize (ashimema) 2024-03-19 14:33:46 UTC Comment hidden (obsolete)
Comment 45 Martin Renvoize (ashimema) 2024-03-19 14:33:49 UTC Comment hidden (obsolete)
Comment 46 Martin Renvoize (ashimema) 2024-03-19 14:33:52 UTC Comment hidden (obsolete)
Comment 47 Martin Renvoize (ashimema) 2024-03-19 14:33:55 UTC Comment hidden (obsolete)
Comment 48 Martin Renvoize (ashimema) 2024-03-19 14:33:58 UTC Comment hidden (obsolete)
Comment 49 Martin Renvoize (ashimema) 2024-03-19 14:34:01 UTC Comment hidden (obsolete)
Comment 50 Martin Renvoize (ashimema) 2024-03-19 14:34:04 UTC Comment hidden (obsolete)
Comment 51 Martin Renvoize (ashimema) 2024-03-19 14:35:13 UTC
Credit where credits are due.. I added the Sponsored-by lines to the commits having forgotten until now.
Comment 52 Martin Renvoize (ashimema) 2024-03-20 16:50:24 UTC
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>
Comment 53 Martin Renvoize (ashimema) 2024-03-20 16:50:27 UTC
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>
Comment 54 Martin Renvoize (ashimema) 2024-03-20 16:50:31 UTC
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>
Comment 55 Martin Renvoize (ashimema) 2024-03-20 16:50:34 UTC
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>
Comment 56 Martin Renvoize (ashimema) 2024-03-20 16:50:37 UTC
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>
Comment 57 Martin Renvoize (ashimema) 2024-03-20 16:50:40 UTC
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>
Comment 58 Martin Renvoize (ashimema) 2024-03-20 16:50:43 UTC
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>
Comment 59 Martin Renvoize (ashimema) 2024-03-20 16:51:27 UTC
Just a rebase on the tidy up bug.
Comment 60 Nick Clemens (kidclamp) 2024-03-20 18:08:54 UTC
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
Comment 61 Martin Renvoize (ashimema) 2024-03-21 12:55:10 UTC
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>
Comment 62 Martin Renvoize (ashimema) 2024-03-21 12:55:14 UTC
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>
Comment 63 Martin Renvoize (ashimema) 2024-03-21 12:55:17 UTC
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>
Comment 64 Martin Renvoize (ashimema) 2024-03-21 12:55:20 UTC
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>
Comment 65 Martin Renvoize (ashimema) 2024-03-21 12:55:24 UTC
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>
Comment 66 Martin Renvoize (ashimema) 2024-03-21 12:55:27 UTC
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>
Comment 67 Martin Renvoize (ashimema) 2024-03-21 12:55:30 UTC
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>
Comment 68 Martin Renvoize (ashimema) 2024-03-21 12:55:33 UTC
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
Comment 69 Martin Renvoize (ashimema) 2024-03-21 12:55:36 UTC
Created attachment 163611 [details] [review]
Bug 36120: Schema update
Comment 70 Martin Renvoize (ashimema) 2024-03-21 12:55:39 UTC
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
Comment 71 Martin Renvoize (ashimema) 2024-03-21 12:55:42 UTC
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.
Comment 72 Martin Renvoize (ashimema) 2024-03-21 12:57:20 UTC
(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
Comment 73 Martin Renvoize (ashimema) 2024-03-21 15:38:22 UTC
Created attachment 163635 [details] [review]
Bug 36120: Re-enable 'Any item' selectable
Comment 74 Martin Renvoize (ashimema) 2024-03-21 15:38:25 UTC
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.
Comment 75 Martin Renvoize (ashimema) 2024-03-21 15:42:32 UTC
(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.
Comment 76 Nick Clemens (kidclamp) 2024-04-18 12:53:47 UTC
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
Comment 77 Martin Renvoize (ashimema) 2024-04-18 15:58:33 UTC
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.
Comment 78 Martin Renvoize (ashimema) 2024-04-18 16:04:00 UTC
Seems I missed part of the the last commit last upload.. squashed and uploaded it again.. that should resolve your issue Nick
Comment 79 Martin Renvoize (ashimema) 2024-04-19 13:33:28 UTC
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>
Comment 80 Martin Renvoize (ashimema) 2024-04-19 13:33:32 UTC
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>
Comment 81 Martin Renvoize (ashimema) 2024-04-19 13:33:35 UTC
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>
Comment 82 Martin Renvoize (ashimema) 2024-04-19 13:33:39 UTC
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>
Comment 83 Martin Renvoize (ashimema) 2024-04-19 13:33:43 UTC
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>
Comment 84 Martin Renvoize (ashimema) 2024-04-19 13:33:46 UTC
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>
Comment 85 Martin Renvoize (ashimema) 2024-04-19 13:33:49 UTC
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>
Comment 86 Martin Renvoize (ashimema) 2024-04-19 13:33:52 UTC
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
Comment 87 Martin Renvoize (ashimema) 2024-04-19 13:33:56 UTC
Created attachment 165183 [details] [review]
Bug 36120: Schema update
Comment 88 Martin Renvoize (ashimema) 2024-04-19 13:33:59 UTC
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
Comment 89 Martin Renvoize (ashimema) 2024-04-19 13:34:02 UTC
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.
Comment 90 Martin Renvoize (ashimema) 2024-04-19 13:34:05 UTC
Created attachment 165186 [details] [review]
Bug 36120: Re-enable 'Any item' selectable
Comment 91 Martin Renvoize (ashimema) 2024-04-19 13:34:08 UTC
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.
Comment 92 Martin Renvoize (ashimema) 2024-04-19 13:34:11 UTC
Created attachment 165188 [details] [review]
Bug 36120: Ensure pickup location and item can be picked in either order
Comment 93 Martin Renvoize (ashimema) 2024-04-19 15:22:52 UTC
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.
Comment 94 Martin Renvoize (ashimema) 2024-04-19 15:40:13 UTC
Created attachment 165215 [details] [review]
Bug 36120: Restore edit
Comment 95 Martin Renvoize (ashimema) 2024-04-19 15:50:23 UTC
Created attachment 165216 [details] [review]
Bug 36120: Restore edit
Comment 96 Nick Clemens (kidclamp) 2024-04-23 17:42:17 UTC
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>
Comment 97 Nick Clemens (kidclamp) 2024-04-23 17:42:20 UTC
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>
Comment 98 Nick Clemens (kidclamp) 2024-04-23 17:42:22 UTC
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>
Comment 99 Nick Clemens (kidclamp) 2024-04-23 17:42:25 UTC
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>
Comment 100 Nick Clemens (kidclamp) 2024-04-23 17:42:27 UTC
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>
Comment 101 Nick Clemens (kidclamp) 2024-04-23 17:42:30 UTC
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>
Comment 102 Nick Clemens (kidclamp) 2024-04-23 17:42:32 UTC
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>
Comment 103 Nick Clemens (kidclamp) 2024-04-23 17:42:35 UTC
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>
Comment 104 Nick Clemens (kidclamp) 2024-04-23 17:42:39 UTC
Created attachment 165427 [details] [review]
Bug 36120: Schema update

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 105 Nick Clemens (kidclamp) 2024-04-23 17:42:41 UTC
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>
Comment 106 Nick Clemens (kidclamp) 2024-04-23 17:42:44 UTC
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>
Comment 107 Nick Clemens (kidclamp) 2024-04-23 17:42:46 UTC
Created attachment 165430 [details] [review]
Bug 36120: Re-enable 'Any item' selectable

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 108 Nick Clemens (kidclamp) 2024-04-23 17:42:49 UTC
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>
Comment 109 Nick Clemens (kidclamp) 2024-04-23 17:42:52 UTC
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>
Comment 110 Nick Clemens (kidclamp) 2024-04-23 17:42:54 UTC
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>
Comment 111 Nick Clemens (kidclamp) 2024-04-23 17:42:57 UTC
Created attachment 165434 [details] [review]
Bug 36120: Restore edit

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 112 Nick Clemens (kidclamp) 2024-04-23 17:42:59 UTC
Created attachment 165435 [details] [review]
Bug 36120: (QA follow-up) Tidy

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 113 Nick Clemens (kidclamp) 2024-04-25 17:20:24 UTC
t/db_dependent/api/v1/biblios.t -s failing after these patch sets
Comment 114 Nick Clemens (kidclamp) 2024-04-25 17:24:17 UTC
Also:
t/db_dependent/Circulation.t 
t/db_dependent/api/v1/bookings.t
Comment 115 Martin Renvoize (ashimema) 2024-05-01 15:03:13 UTC
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>
Comment 116 Martin Renvoize (ashimema) 2024-05-01 15:03:17 UTC
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>
Comment 117 Martin Renvoize (ashimema) 2024-05-01 15:03:21 UTC
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>
Comment 118 Martin Renvoize (ashimema) 2024-05-01 15:03:25 UTC
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>
Comment 119 Martin Renvoize (ashimema) 2024-05-01 15:03:28 UTC
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>
Comment 120 Martin Renvoize (ashimema) 2024-05-01 15:03:32 UTC
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>
Comment 121 Martin Renvoize (ashimema) 2024-05-01 15:03:36 UTC
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>
Comment 122 Martin Renvoize (ashimema) 2024-05-01 15:03:39 UTC
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>
Comment 123 Martin Renvoize (ashimema) 2024-05-01 15:03:42 UTC
Created attachment 165992 [details] [review]
Bug 36120: Schema update

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 124 Martin Renvoize (ashimema) 2024-05-01 15:03:46 UTC
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>
Comment 125 Martin Renvoize (ashimema) 2024-05-01 15:03:49 UTC
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>
Comment 126 Martin Renvoize (ashimema) 2024-05-01 15:03:53 UTC
Created attachment 165995 [details] [review]
Bug 36120: Re-enable 'Any item' selectable

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 127 Martin Renvoize (ashimema) 2024-05-01 15:03:56 UTC
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>
Comment 128 Martin Renvoize (ashimema) 2024-05-01 15:03:59 UTC
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>
Comment 129 Martin Renvoize (ashimema) 2024-05-01 15:04:02 UTC
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>
Comment 130 Martin Renvoize (ashimema) 2024-05-01 15:04:06 UTC
Created attachment 165999 [details] [review]
Bug 36120: Restore edit

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 131 Martin Renvoize (ashimema) 2024-05-01 15:04:09 UTC
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>
Comment 132 Martin Renvoize (ashimema) 2024-05-01 15:04:13 UTC
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>
Comment 133 Martin Renvoize (ashimema) 2024-05-01 15:04:16 UTC
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>
Comment 134 Martin Renvoize (ashimema) 2024-05-01 15:05:00 UTC
Tests all passing now and full set rebased.
Comment 135 Katrin Fischer 2024-05-03 14:03:52 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 136 Fridolin Somers 2024-05-24 13:06:22 UTC
Not backported to 23.11.x