Bug 36870

Summary: Don't ask for pickup location when there is only one library
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: Hold requestsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, lucas, philippe.blouin
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36871
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Caroline Cyr La Rose 2024-05-15 18:40:21 UTC
When placing multiple holds, DefaultHoldPickupLocation doesn't select a default library (probably since items can have different home or holding libraries). But in installations where there is only one library, it adds an unnecessary step to select a pickup library.

To recreate:

0. If you have more than one library, you need to move the items and patrons to one library and delete the others. For example, in KTD

ktd --dbshell

update borrowers set branchcode = 'CPL';

update items set homebranch = 'CPL', holdingbranch = 'CPL';

Then go to Administration > Libraries and delete all the libraries except Centerville.

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

These fields should default to the single library.