Bug 31015

Summary: Remove option to clear pickup location selects on multi-holds page
Product: Koha Reporter: Jason Robb <jrobb>
Component: Hold requestsAssignee: Bugs List <koha-bugs>
Status: RESOLVED MOVED QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: gmcharlt
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Jason Robb 2022-06-22 15:08:20 UTC
When placing multiple holds at once, the various selects for pickup location have a little X at the far right next to the dropdown arrow. Clicking the X clears the field and allows for holds to be created with null pickup locations.

We discovered the hard way that things like the holds queue completely break when there are null pickup locations lurking about. It also seems to prevent the holds tab on the patron account from loading.
Comment 1 Jason Robb 2022-06-22 16:03:51 UTC
After a picking at this a little bit more, it seems the custom jQuery I'm using to prefill the pickup locations is facilitating the problem.

If I disable the jQuery, the page pops up an alert and won't save with an empty pickup location.

The X to clear that top pickup location select doesn't appear when placing a single-title hold so it might still make sense to get rid of it on the multi-hold page to match behaviors.
Comment 2 Katrin Fischer 2022-07-17 11:28:12 UTC
The x is part of the select2 pull downs, not sure if it can be removed.
Comment 3 Jason Robb 2022-11-02 20:50:17 UTC
The larger issue was that holds could be placed without branchcodes assigned under certain circumstances.

If I'm understanding correctly, bug 31086 seems to fully prevent that from happening so this may not be a problem any longer.
Comment 4 Katrin Fischer 2023-06-18 12:08:34 UTC
(In reply to Jason Robb from comment #3)
> The larger issue was that holds could be placed without branchcodes assigned
> under certain circumstances.
> 
> If I'm understanding correctly, bug 31086 seems to fully prevent that from
> happening so this may not be a problem any longer.

Marking as MOVED.