Bug 36871 - Honor DefaultHoldPickupLocation when placing holds for multiple items at once
Summary: Honor DefaultHoldPickupLocation when placing holds for multiple items at once
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Lucas Gass (lukeg)
QA Contact: Paul Derscheid
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-15 18:43 UTC by Caroline Cyr La Rose
Modified: 2024-09-13 09:46 UTC (History)
5 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:
Circulation function:


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 (lukeg)
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
Bug 36871: Honor DefaultHoldPickupLocation when placing holds for multiple items at once (4.31 KB, patch)
2024-09-10 16:00 UTC, Paul Derscheid
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 (lukeg) 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 (lukeg) 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.
Comment 6 Paul Derscheid 2024-09-10 16:00:11 UTC
Created attachment 171263 [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>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Comment 7 Katrin Fischer 2024-09-13 09:35:42 UTC
I seem to remember a discussion about this when we last touched this code. I think the problem was that the DefaultHoldPickupLocation could be an invalid choice for all or some of the records when placing multiple holds.

Has thie been tested or taken into account here?

(Failed QA for the question)
Comment 8 Paul Derscheid 2024-09-13 09:41:55 UTC
But isn't this handled by $biblio->pickup_locations ?
Comment 9 Katrin Fischer 2024-09-13 09:46:56 UTC
(In reply to Paul Derscheid from comment #8)
> But isn't this handled by $biblio->pickup_locations ?

Queue is a bit full, so not time for extensive testing. Would be good to verify :)