[Bug 25872] New: Advanced search on OPAC with limiter but no search term fails when re-sorted
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25872 Bug ID: 25872 Summary: Advanced search on OPAC with limiter but no search term fails when re-sorted Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Searching - Elasticsearch Assignee: koha-bugs@lists.koha-community.org Reporter: andrew@bywatersolutions.com To recreate: - go to adv search on the OPAC - check a limiter box under CCODE, LOC, or ITYPE - do not enter any search terms - click search, get results - use the Sort dropdown to change the sort - Koha kicks you back to the search page -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25872 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisetteslatah@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25872 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25872 Heather <heather_hernandez@nps.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |heather_hernandez@nps.gov -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25872 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25872 Barbara Johnson <barbara.johnson@bedfordtx.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |barbara.johnson@bedfordtx.g | |ov -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25872 --- Comment #1 from Barbara Johnson <barbara.johnson@bedfordtx.gov> --- We're using some dropdown lists of search options based on shelving location codes that patrons can use to easily get to new items. <h1>Just Arrived</h1> <p><form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl"> <input name="idx" value="kw" type="hidden"> <input name="sort_by" value="acqdate_dsc" type="hidden"> <input name="do" value="OK" type="hidden"> <select name="limit" onchange="this.form.submit()"> <option>-- Please choose --</option> <option value="mc-loc:FN">New Fiction</option> <option value="mc-loc:FMN">New Mystery</option> <option value="mc-loc:FYAN">New YA Fiction</option> </select> </form> </p> We also use some jQuery for an item type limiter that can be used when searching. //BEGIN Add Search Limits to Main Search Box opac-main.pl $(".mastheadsearch #masthead_search").after(" <select name='limit' id='item_type_dropdown'><option value=''>All Items</option><option id='book_limit' value='mc-itype,phr:BOOK'>Books</option><option id='dvdmovie_limit' value='mc-itype,phr:DVDMOVIE'>DVDs (Movies & TV)</option><option id='dvdnf_limit' value='mc-itype,phr:DVDNF'>DVDs (Non-Fiction)</option></select>"); Because the code doesn't have search terms in it the list of results can't be sorted. We could change everything to use direct urls but that takes a lot of time. Being able to use locations and item types in the code is easier and cleaner. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25872 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25872 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 108176 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108176&action=edit Bug 25872: Unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25872 --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 108177 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108177&action=edit Bug 25872: Fix scoping of $limits To test: 1 - Enable Elasticsearch 2 - On OPAC perform advanced search, selecting only an itype, ccode, or LOC limit 3 - Attempt to sort results 4 - You are returned to Advanced search 5 - Apply patch 6 - Repeat 7 - It sorts! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25872 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |22592 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22592 [Bug 22592] Elasticsearch - Support for index scan -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25872 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #108176|0 |1 is obsolete| | --- Comment #4 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 108211 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108211&action=edit Bug 25872: Unit tests Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25872 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #108177|0 |1 is obsolete| | --- Comment #5 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 108212 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108212&action=edit Bug 25872: Fix scoping of $limits To test: 1 - Enable Elasticsearch 2 - On OPAC perform advanced search, selecting only an itype, ccode, or LOC limit 3 - Attempt to sort results 4 - You are returned to Advanced search 5 - Apply patch 6 - Repeat 7 - It sorts! Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25872 Lisette Scheer <lisetteslatah@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #6 from Lisette Scheer <lisetteslatah@gmail.com> --- Worked great! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25872 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25872 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #108211|0 |1 is obsolete| | --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 108257 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108257&action=edit Bug 25872: Unit tests Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25872 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #108212|0 |1 is obsolete| | --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 108258 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108258&action=edit Bug 25872: Fix scoping of $limits To test: 1 - Enable Elasticsearch 2 - On OPAC perform advanced search, selecting only an itype, ccode, or LOC limit 3 - Attempt to sort results 4 - You are returned to Advanced search 5 - Apply patch 6 - Repeat 7 - It sorts! Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25872 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Please remember to include a short description of the fix (what was wrong?) in your commit message as well. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25872 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #108258|0 |1 is obsolete| | --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 108507 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108507&action=edit Bug 25872: Fix scoping of $limits The code in build_query_compat contained a 'my' in the assigning of limits for the search in a conditional This meant the limits were being set correctly during the conditional, but we blanked when passed to the rest of the code. The effect was that the searches worked, however, the template params to repeat the search were incomplete. Removing the my ensures the same limits are applied during search and on re-sorting To test: 1 - Enable Elasticsearch 2 - On OPAC perform advanced search, selecting only an itype, ccode, or LOC limit 3 - Attempt to sort results 4 - You are returned to Advanced search 5 - Apply patch 6 - Repeat 7 - It sorts! Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25872 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25872 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25872 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|20.11.00 |20.11.00, 20.05.03 released in| | --- Comment #12 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 20.05.x for 20.05.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25872 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aleisha@catalyst.net.nz --- Comment #13 from Aleisha Amohia <aleisha@catalyst.net.nz> --- couldn't reproduce on 19.11.x. not backported -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org