Bug 30500 - Add option to allow user to change the pickup location while a hold is in transit
Summary: Add option to allow user to change the pickup location while a hold is in tra...
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 22456
Blocks:
  Show dependency treegraph
 
Reported: 2022-04-08 14:50 UTC by Nick Clemens
Modified: 2022-08-05 15:05 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00


Attachments
Bug 30500: Add OPACInTransitHoldPickupLocationChange syspref (11.06 KB, patch)
2022-06-08 20:40 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30500: Allow patrons to change in transit holds pickup locations (4.12 KB, patch)
2022-06-08 20:40 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30500: Add OPACInTransitHoldPickupLocationChange syspref (11.11 KB, patch)
2022-06-08 20:46 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30500: Allow patrons to change in transit holds pickup locations (4.17 KB, patch)
2022-06-08 20:46 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30500: Add OPACInTransitHoldPickupLocationChange syspref (11.17 KB, patch)
2022-06-08 22:14 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 30500: Allow patrons to change in transit holds pickup locations (4.23 KB, patch)
2022-06-08 22:14 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 30500: (QA follow-up) Separate code execution streams for obviously independent parameters (1.60 KB, patch)
2022-08-05 12:48 UTC, Peter Vashchuk
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2022-04-08 14:50:10 UTC
Currently, when a hold is in transit form one library to another, the patron cannot change the pickup location.

Some libraries would like to allow the option for the patron to switch the pickup location before the book has arrived.

We should add a system preference that enables this change, Koha circulation can already handle this, if you change the location in the DB manually the hold is transferred again when arriving at initial location
Comment 1 Tomás Cohen Arazi 2022-06-08 20:40:53 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi 2022-06-08 20:40:58 UTC Comment hidden (obsolete)
Comment 3 Tomás Cohen Arazi 2022-06-08 20:46:45 UTC
Created attachment 135836 [details] [review]
Bug 30500: Add OPACInTransitHoldPickupLocationChange syspref

Sponsored-by: Montgomery County Public Libraries

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Tomás Cohen Arazi 2022-06-08 20:46:52 UTC
Created attachment 135837 [details] [review]
Bug 30500: Allow patrons to change in transit holds pickup locations

This patch adds a way for patrons to change the pickup location for in
transit holds.

This is done in the OPAC on the holds table.

The feature is controlled by a new system preference:

* OPACInTransitHoldPickupLocationChange

To test:
1. Apply this patches
2. Run:
   $ updatedatabase
   $ restart_all
=> SUCCESS: system preference added
3. Have an in-transit hold for a known patron
4. Visit the holds table for the patron (OPAC)
=> SUCCESS: Hold in transit, cannot change pickup location
5. Enable the OPACInTransitHoldPickupLocationChange system preference
=> SUCCESS: Descriptive text makes sense and is idiomatic
6. Reload the OPAC page
=> SUCCESS: You can now choose a new pickup location
7. Choose one
=> SUCCESS: It works! Reloaded page pre-selects the new pickup location
8. Switch to the new pickup location library on the staff interface
9. Go to Circulation > Transfers to receive
=> SUCCESS: The hold is there!
10. Scan the hold
=> SUCCESS: Usual workflow follows
11. Sign off :-D

Sponsored-by: Montgomery County Public Libraries

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 5 Lucas Gass 2022-06-08 22:14:55 UTC
Created attachment 135847 [details] [review]
Bug 30500: Add OPACInTransitHoldPickupLocationChange syspref

Sponsored-by: Montgomery County Public Libraries

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 6 Lucas Gass 2022-06-08 22:14:58 UTC
Created attachment 135848 [details] [review]
Bug 30500: Allow patrons to change in transit holds pickup locations

This patch adds a way for patrons to change the pickup location for in
transit holds.

This is done in the OPAC on the holds table.

The feature is controlled by a new system preference:

* OPACInTransitHoldPickupLocationChange

To test:
1. Apply this patches
2. Run:
   $ updatedatabase
   $ restart_all
=> SUCCESS: system preference added
3. Have an in-transit hold for a known patron
4. Visit the holds table for the patron (OPAC)
=> SUCCESS: Hold in transit, cannot change pickup location
5. Enable the OPACInTransitHoldPickupLocationChange system preference
=> SUCCESS: Descriptive text makes sense and is idiomatic
6. Reload the OPAC page
=> SUCCESS: You can now choose a new pickup location
7. Choose one
=> SUCCESS: It works! Reloaded page pre-selects the new pickup location
8. Switch to the new pickup location library on the staff interface
9. Go to Circulation > Transfers to receive
=> SUCCESS: The hold is there!
10. Scan the hold
=> SUCCESS: Usual workflow follows
11. Sign off :-D

Sponsored-by: Montgomery County Public Libraries

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 7 Peter Vashchuk 2022-08-05 12:48:23 UTC
Created attachment 138690 [details] [review]
Bug 30500: (QA follow-up) Separate code execution streams for obviously independent parameters

When $new_pickup_location gets passed as parameter it doesn't make any
sense to also check is_cancelable_from_opac.

Also this makes code more clearer as it seemed like it was possible for
item to get cancelled at the same time as request to change pickup
location.
Comment 8 Tomás Cohen Arazi 2022-08-05 15:05:34 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!