[Bug 14816] New: Item search returns no results with multiple values selected for one field
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14816 Bug ID: 14816 Summary: Item search returns no results with multiple values selected for one field Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Searching Assignee: gmcharlt@gmail.com Reporter: kyle.m.hall@gmail.com QA Contact: testopia@bugs.koha-community.org If you select multiple values from the pulldown for a give field ( e.g. home library ), the search will never return results. I believe this issue is due to the fact that the query is using IN but is treating the entire list of values for the IN as a single string to be quoted, instead of a list of comma separated string to be quoted individually. 'str' => '(homebranch IN (?))' 'args' => 'CPL,FFL,FPL,FRL,IPT,LPL,MPL,MY,PVL,RPL,SPL,TPL,UPL' -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14816 Kyle M Hall <kyle.m.hall@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14816 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jonathan.druart@bugs.koha-c |julian.maurice@biblibre.com |ommunity.org | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14816 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14816 --- Comment #1 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 46395 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46395&action=edit Bug 14816: Fix multiple selection in item search Send each selected value as a separate parameter. Otherwise DataTables (or jQuery ?) joins all values with a comma -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14816 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14816 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #46395|0 |1 is obsolete| | --- Comment #2 from Marc Véron <veron@veron.ch> --- Created attachment 46436 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46436&action=edit Bug 14816: Fix multiple selection in item search Send each selected value as a separate parameter. Otherwise DataTables (or jQuery ?) joins all values with a comma Tested / compared with several combinations, e.g. "All libraries" vs all libraries checked. With patch result is the same (without, all libraries checked had zero result). Works as expected. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14816 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14816 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #46436|0 |1 is obsolete| | --- Comment #3 from Aleisha Amohia <aleishaamohia@hotmail.com> --- Created attachment 46504 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46504&action=edit Bug 14816: Fix multiple selection in item search Send each selected value as a separate parameter. Otherwise DataTables (or jQuery ?) joins all values with a comma Tested / compared with several combinations, e.g. "All libraries" vs all libraries checked. With patch result is the same (without, all libraries checked had zero result). Works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Aleisha <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14816 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Julian, I'd suggest to simplify with something like: $form.find('select').not('[disabled]').find('option:selected').each(function () { I have tried and it seems to work, please confirm. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14816 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org