| Summary: | Item search returns no results with multiple values selected for one field | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Kyle M Hall (khall) <kyle> |
| Component: | Searching | Assignee: | Julian Maurice <julian.maurice> |
| Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
| Severity: | normal | ||
| Priority: | P5 - low | CC: | brendan, f.demians, jonathan.druart |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | Small patch |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
| Attachments: |
Bug 14816: Fix multiple selection in item search
Bug 14816: Fix multiple selection in item search Bug 14816: Fix multiple selection in item search Bug 14816: Fix multiple selection in item search [SIGNED-OFF] Bug 14816: Fix multiple selection in item search Bug 14816: Fix multiple selection in item search |
||
|
Description
Kyle M Hall (khall)
2015-09-14 13:09:49 UTC
Created attachment 46395 [details] [review] 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 Created attachment 46436 [details] [review] 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> Created attachment 46504 [details] [review] 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> 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.
Created attachment 49952 [details] [review] 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 (In reply to Jonathan Druart from comment #4) > 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. Yep, much better, thanks. I removed the signoffs (sorry Marc and Aleisha), so I reset status to Needs signoff Created attachment 49960 [details] [review] [SIGNED-OFF] 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 Signed-off-by: Owen Leonard <oleonard@myacpl.org> I could not reproduce the bug when selecting multiple home libraries, but I could by selecting multiple item types or collection codes. The patch allowed those queries to complete correctly. Created attachment 49977 [details] [review] 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 Signed-off-by: Owen Leonard <oleonard@myacpl.org> I could not reproduce the bug when selecting multiple home libraries, but I could by selecting multiple item types or collection codes. The patch allowed those queries to complete correctly. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Pushed to Master - Should be in the May 2016 Release. Thanks! Patch pushed to 3.22.x, will be in 3.22.6 Pushed to 3.22.x, will be in 3.20.11. |