Bug 36871 - Honor DefaultHoldPickupLocation when placing holds for multiple items at once
Summary: Honor DefaultHoldPickupLocation when placing holds for multiple items at once
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Lucas Gass
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-15 18:43 UTC by Caroline Cyr La Rose
Modified: 2024-05-17 13:41 UTC (History)
3 users (show)

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


Attachments
Bug 36871: Honor DefaultHoldPickupLocation when placing holds for multiple items at once (4.19 KB, patch)
2024-05-16 22:57 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 36871: Honor DefaultHoldPickupLocation when placing holds for multiple items at once (4.26 KB, patch)
2024-05-17 13:36 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2024-05-15 18:43:02 UTC
If DefaultHoldPickupLocation is set to logged in library, this should be taken into account when placing multi-holds. 

To recreate:
0. Make sure the DefaultHoldPickupLocation system preference is set to logged in library.
1. In the staff interface, search the catalog with a term that will return a couple of items (e.g. Shakespeare)
2. In the search results, select two or more results
3. Click Place hold
4. Search for a patron (e.g. Acevedo)
   --> "Pickup at" and "Pickup location" are empty and the staff member must select the library
Comment 1 Lucas Gass 2024-05-16 22:57:10 UTC
Created attachment 166857 [details] [review]
Bug 36871: Honor DefaultHoldPickupLocation when placing holds for multiple items at once

To test:
0. Make sure the DefaultHoldPickupLocation system preference is set to logged in library.
1. In the staff interface, search the catalog with a term that will return a couple of items (e.g. Shakespeare)
2. In the search results, select two or more results
3. Click Place hold
4. Search for a patron (e.g. Acevedo)
   --> "Pickup location" is empty and the staff member must select the library
5. APPLY PATCH and restart_all
6. Try again, the default should be set according to the DefaultHoldPickupLocation system preference
Comment 2 Lucas Gass 2024-05-16 23:00:19 UTC
This patch sets the 'Pickup location' according to the DefaultHoldPickupLocation but not the 'Pickup at' higher up because I was unsure how you'd set that to the item's home/holding branch when there are more than 1 holds being placed. 

I was thinking it would be nice that if you changed 'Pickup at' al the lower 'Pickup location' would also change to what you choose?
Comment 3 Caroline Cyr La Rose 2024-05-17 13:20:02 UTC
(In reply to Lucas Gass from comment #2)
> This patch sets the 'Pickup location' according to the
> DefaultHoldPickupLocation but not the 'Pickup at' higher up because I was
> unsure how you'd set that to the item's home/holding branch when there are
> more than 1 holds being placed. 

That's why I specified "if DefaultHoldPickupLocation is set to logged in library". It should be the same for all holds in that case.

The client who reported this to me is a one-branch library and they wanted to avoid having to choose a branch there (I also filed bug 36870 about that). But I figured if their pref is set to logged in library, it would be another way to avoid the extra clicks.
Comment 4 Caroline Cyr La Rose 2024-05-17 13:36:09 UTC
Created attachment 166905 [details] [review]
Bug 36871: Honor DefaultHoldPickupLocation when placing holds for multiple items at once

To test:
0. Make sure the DefaultHoldPickupLocation system preference is set to logged in library.
1. In the staff interface, search the catalog with a term that will return a couple of items (e.g. Shakespeare)
2. In the search results, select two or more results
3. Click Place hold
4. Search for a patron (e.g. Acevedo)
   --> "Pickup location" is empty and the staff member must select the library
5. APPLY PATCH and restart_all
6. Try again, the default should be set according to the DefaultHoldPickupLocation system preference

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Comment 5 Caroline Cyr La Rose 2024-05-17 13:37:05 UTC
Thanks Lucas, I hadn't realized we had to fill either the top or the bottom ones. It works this way and removes the extra click.