Bug 40321 - DataTables search ( dt-search ) does not work on holds history page
Summary: DataTables search ( dt-search ) does not work on holds history page
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 35560
Blocks:
  Show dependency treegraph
 
Reported: 2025-07-07 17:24 UTC by Lucas Gass (lukeg)
Modified: 2025-07-24 17:51 UTC (History)
5 users (show)

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


Attachments
Bug 40321: Fix hold history search (1.38 KB, patch)
2025-07-24 10:10 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40321: Fix hold history search (1.43 KB, patch)
2025-07-24 17:51 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass (lukeg) 2025-07-07 17:24:46 UTC
Using the DataTables native search ( dt-search ) doesn't seem to work on the holds history page.

To recreate:
1. Have a patron with holds history
2. Go to members/holdshistory.pl?borrowernumber=x where x is the borrowernumber 
3. Try to us the DT seacch to filter
4. Nothing gets filtered.
Comment 1 Lucas Gass (lukeg) 2025-07-22 17:36:02 UTC
Matt clued me in on what is happening here. It has to do with checkboxes for pending, waiting, processing, and in transit. 

"It's one big OR query which includes an array of all the possible statuses if the boxes are checked. So if you don’t touch those filters then it will always return all results." 

The checkboxes are going to take precedent in any search one does, and that feels right to me. 

You can also filter per individual column and that works as excepted. 

So in this case I think what we should do is change the dataTable config to NOT include the dt-search "search bar".
Comment 2 Jonathan Druart 2025-07-24 10:10:22 UTC
Created attachment 184583 [details] [review]
Bug 40321: Fix hold history search

The table global search didn't combine correctly with the status filters.

Test plan:
1. Have a patron with holds history
2. Go to members/holdshistory.pl?borrowernumber=x where x is the borrowernumber
3. Try to us the DT seacch to filter
=> Filtering is working as expected
Comment 3 Lucas Gass (lukeg) 2025-07-24 17:50:26 UTC
Trivial fix that makes a whole lot of sense, this is the behavior most people want.
Comment 4 Lucas Gass (lukeg) 2025-07-24 17:51:37 UTC
Created attachment 184600 [details] [review]
Bug 40321: Fix hold history search

The table global search didn't combine correctly with the status filters.

Test plan:
1. Have a patron with holds history
2. Go to members/holdshistory.pl?borrowernumber=x where x is the borrowernumber
3. Try to us the DT seacch to filter
=> Filtering is working as expected

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>