Bug 38628 - Item search filters does not work with multiple search fields
Summary: Item search filters does not work with multiple search fields
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-05 08:38 UTC by Johanna Räisä
Modified: 2024-12-10 15:02 UTC (History)
2 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

Note You need to log in before you can comment on or make changes to this bug.
Description Johanna Räisä 2024-12-05 08:38:56 UTC
When using more than one search field, the datatable filtering does not work. The same resultset is given every time if you are trying to filter.
Comment 1 Jonathan Druart 2024-12-05 12:53:10 UTC
Can you detail? Is this about the pref DefaultPatronSearchFields?
Comment 2 Jonathan Druart 2024-12-05 12:55:05 UTC
Sorry, *items* not *patrons*!
Comment 3 Johanna Räisä 2024-12-05 12:57:28 UTC
If you perform a item search like "title is dog% or title is cat%", after that when you start filtering from datatables the resultset is always the same.

Hope you understand from that. :)
Comment 4 Jonathan Druart 2024-12-10 14:50:41 UTC
Is it a regression or it never worked?
Comment 5 Jonathan Druart 2024-12-10 15:02:16 UTC
I think it never worked.

catalogue/itemsearch.pl
We deal with "columns":
 83     $cgi->param( 'f',  @f );
 84     $cgi->param( 'q',  @q );
 85     $cgi->param( 'op', @op );
 86     $cgi->param( 'c',  @c );

Then:
160     my @c           = $param_names{'c[]'}  ? $cgi->multi_param('c[]')  : $cgi->multi_param('c');      
161     my @fields      = $param_names{'f[]'}  ? $cgi->multi_param('f[]')  : $cgi->multi_param('f');
162     my @q           = $param_names{'q[]'}  ? $cgi->multi_param('q[]')  : $cgi->multi_param('q');
163     my @op          = $param_names{'op[]'} ? $cgi->multi_param('op[]') : $cgi->multi_param('op');