Bug 20652 - Sort after item type search fails
Summary: Sort after item type search fails
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 19461
Blocks:
  Show dependency treegraph
 
Reported: 2018-04-24 14:50 UTC by John Yorio
Modified: 2019-10-14 19:56 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 20652: Fix result sorting after search on limit only (1.66 KB, patch)
2018-04-24 18:41 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 20652: Fix result sorting after search on limit only (1.72 KB, patch)
2018-05-25 19:31 UTC, Pierre-Luc Lapointe
Details | Diff | Splinter Review
Bug 20652: Fix result sorting after search on limit only (1.78 KB, patch)
2018-05-28 08:37 UTC, Chris Cormack
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 2018-05-29 14:36:58 UTC
Pushed to master for 18.11.

Awesome work all, thank you.
Comment 6 Martin Renvoize 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