Bug 20652

Summary: Sort after item type search fails
Product: Koha Reporter: John Yorio <jyorio>
Component: Staff interfaceAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: fridolin.somers, gmcharlt, jonathan.druart, martin.renvoize, nick, pierre-luc.lapointe
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 19461    
Bug Blocks:    
Attachments: Bug 20652: Fix result sorting after search on limit only
Bug 20652: Fix result sorting after search on limit only
Bug 20652: Fix result sorting after search on limit only

Description John Yorio 2018-04-24 14:50:52 UTC
Steps to reproduce:

Advanced Search
Choose an Item type (do not enter any other search limits)
Search
Click on Sort (it doesn't appear to matter what you sort on)
The results don't sort.


I did notice that the URL changes and a string of %20s follows the sort_by=

For example:

sort_by=title_az%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20&limit=mc-itype,phr:62

If I cut the %20s out of the URL and load it, then the sorted results appear.
Comment 1 Jonathan Druart 2018-04-24 18:36:45 UTC
Certainly caused by
  commit 7d2cb42dceeeb004ab7447fd6beccab5fac37e23
  Bug 19461: Add floating toolbar to staff client catalog search results
Comment 2 Jonathan Druart 2018-04-24 18:41:11 UTC
Created attachment 74822 [details] [review]
Bug 20652: Fix result sorting after search on limit only

1 chomp was missing, spaces were replaced with %20
This patch adds extra chomps, but it does not hurt

Test plan:
Advanced Search
Choose an Item type (do not enter any other search limits)
Search
Click on Sort (it doesn't appear to matter what you sort on)
Comment 3 Pierre-Luc Lapointe 2018-05-25 19:31:22 UTC
Created attachment 75571 [details] [review]
Bug 20652: Fix result sorting after search on limit only

1 chomp was missing, spaces were replaced with %20
This patch adds extra chomps, but it does not hurt

Test plan:
Advanced Search
Choose an Item type (do not enter any other search limits)
Search
Click on Sort (it doesn't appear to matter what you sort on)

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>
Comment 4 Chris Cormack 2018-05-28 08:37:16 UTC
Created attachment 75581 [details] [review]
Bug 20652: Fix result sorting after search on limit only

1 chomp was missing, spaces were replaced with %20
This patch adds extra chomps, but it does not hurt

Test plan:
Advanced Search
Choose an Item type (do not enter any other search limits)
Search
Click on Sort (it doesn't appear to matter what you sort on)

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 5 Nick Clemens (kidclamp) 2018-05-29 14:36:58 UTC
Pushed to master for 18.11.

Awesome work all, thank you.
Comment 6 Martin Renvoize (ashimema) 2018-06-05 10:01:49 UTC
This patch has been pushed to 18.05.x, will be in 18.05.01
Comment 7 Fridolin Somers 2018-06-06 10:03:18 UTC
Pushed to 17.11.x for 17.11.07
Comment 8 Fridolin Somers 2018-06-06 10:12:03 UTC
Bug 19461 not in 17.05.x