Bug 16951 - Item search sorting not working properly for most columns
Summary: Item search sorting not working properly for most columns
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-21 01:37 UTC by Nick Clemens
Modified: 2019-06-27 09:24 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 16951: Fix Item search sorting (1.30 KB, patch)
2016-12-16 10:43 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16951: Replace some more (2.83 KB, patch)
2016-12-16 10:43 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16951: Fix Item search sorting (1.36 KB, patch)
2016-12-22 12:58 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 16951: Replace some more (2.88 KB, patch)
2016-12-22 13:01 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 16951: Fix Item search sorting (1.42 KB, patch)
2016-12-22 13:34 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 16951: Replace some more (2.94 KB, patch)
2016-12-22 13:34 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2016-07-21 01:37:31 UTC
When I pull up items in the item search and arrange by title, publication year, publisher, itemcallnumber, etc. I am getting results that don't seem to make any sense.

I am seeing reports of this in 3.22.8 as well

The order seems to be the same no matter what column, and it almost appears as if they are being ordered by date accessioned
Comment 1 Tom Misilo 2016-07-21 12:52:50 UTC
This seems to be a regression from 3.18, as we were able to sort on call numbers before.
Comment 2 Katrin Fischer 2016-12-14 20:16:44 UTC
Yes, I am pretty sure too that this worked in 3.18 - as a regression I am upping severity a bit.
Comment 3 Jonathan Druart 2016-12-16 10:43:14 UTC
Created attachment 58243 [details] [review]
Bug 16951: Fix Item search sorting

Caused by
  commit ac5a1bfececb5400a77f0ebad90181f5215d5a85
    Bug 16154: CGI->multi_param - Manual changes

The change was wrong, we wanted to retrieve a scalar (the string), not
an array.
We want to retrieve a string with the different column' names, not an
array of 1 element.

Test plan:
Launch an item search and play with column sort
Comment 4 Jonathan Druart 2016-12-16 10:43:18 UTC
Created attachment 58244 [details] [review]
Bug 16951: Replace some more

In order to avoid warnings in the logs, $cgi->param should be forced to
scalar context
Comment 5 Katrin Fischer 2016-12-22 12:58:06 UTC
Created attachment 58381 [details] [review]
Bug 16951: Fix Item search sorting

Caused by
  commit ac5a1bfececb5400a77f0ebad90181f5215d5a85
    Bug 16154: CGI->multi_param - Manual changes

The change was wrong, we wanted to retrieve a scalar (the string), not
an array.
We want to retrieve a string with the different column' names, not an
array of 1 element.

Test plan:
Launch an item search and play with column sort

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2016-12-22 13:01:14 UTC
Created attachment 58382 [details] [review]
Bug 16951: Replace some more

In order to avoid warnings in the logs, $cgi->param should be forced to
scalar context

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Nick Clemens 2016-12-22 13:34:10 UTC
Created attachment 58384 [details] [review]
Bug 16951: Fix Item search sorting

Caused by
  commit ac5a1bfececb5400a77f0ebad90181f5215d5a85
    Bug 16154: CGI->multi_param - Manual changes

The change was wrong, we wanted to retrieve a scalar (the string), not
an array.
We want to retrieve a string with the different column' names, not an
array of 1 element.

Test plan:
Launch an item search and play with column sort

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 8 Nick Clemens 2016-12-22 13:34:15 UTC
Created attachment 58385 [details] [review]
Bug 16951: Replace some more

In order to avoid warnings in the logs, $cgi->param should be forced to
scalar context

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 9 Kyle M Hall 2016-12-22 13:42:41 UTC
Pushed to master for 17.05, thanks Jonathan!
Comment 10 Katrin Fischer 2016-12-22 19:27:21 UTC
These patches have been pushed to 16.11.x, will be in 16.11.01.
Comment 11 Julian Maurice 2017-01-02 11:49:16 UTC
Pushed to 3.22.x for 3.22.14
Comment 12 Mason James 2017-01-29 11:43:33 UTC
Pushed to 16.05.x, for 16.05.07 release