Bug 28069 - Can't sort lists on staff client
Summary: Can't sort lists on staff client
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Lists (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Kyle M Hall
URL:
Keywords:
: 29045 (view as bug list)
Depends on: 27715
Blocks: 28105
  Show dependency treegraph
 
Reported: 2021-04-01 13:43 UTC by Séverine Queune
Modified: 2022-07-17 10:44 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:
21.05.00,20.11.05,20.05.11


Attachments
Bug 28069: (bug 27715 follow-up) Fix sort for lists (3.00 KB, patch)
2021-04-06 15:38 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28069: (bug 27715 follow-up) Fix sort for lists (3.16 KB, patch)
2021-04-07 08:54 UTC, Séverine Queune
Details | Diff | Splinter Review
Bug 28069: (bug 27715 follow-up) Fix sort for lists (3.21 KB, patch)
2021-04-16 14:03 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Séverine Queune 2021-04-01 13:43:32 UTC
On staff client, it's not possible to sort lists by 'Contents'.
Comment 1 Owen Leonard 2021-04-05 13:42:58 UTC
In my test it's not possible to sort by ANY column!
Comment 2 Owen Leonard 2021-04-05 15:08:13 UTC
git bisect blames Bug 27715 - Possibly SQL injection in virtualshelves
Comment 3 Jonathan Druart 2021-04-06 15:38:13 UTC
Created attachment 119226 [details] [review]
Bug 28069: (bug 27715 follow-up) Fix sort for lists

Sort functionality has been broken by bug 27715. We need to specify the
table.column in the datatable init

Note that "count" needs to be handled separately (which is a bit dirty
but cannot find something better)

Test plan:
Create some lists, add contents, change owner and dates
Sort using the different attributes and confirm that it's now working
Comment 4 Séverine Queune 2021-04-06 15:49:18 UTC
Is the "Owner" sort using the borrowernumber instead of borrower's name the excepted behaviour ?
Comment 5 Séverine Queune 2021-04-06 15:49:40 UTC
Is the "Owner" sort using the borrowernumber instead of borrower's name the excepted behaviour ?
Comment 6 Jonathan Druart 2021-04-06 16:07:04 UTC
Absolutely not. However it seems that it was the behaviour pre bug 27715, so it should be addressed on its own bug report.
Comment 7 Séverine Queune 2021-04-07 08:54:15 UTC
Created attachment 119262 [details] [review]
Bug 28069: (bug 27715 follow-up) Fix sort for lists

Sort functionality has been broken by bug 27715. We need to specify the
table.column in the datatable init

Note that "count" needs to be handled separately (which is a bit dirty
but cannot find something better)

Test plan:
Create some lists, add contents, change owner and dates
Sort using the different attributes and confirm that it's now working

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 8 Séverine Queune 2021-04-07 08:57:21 UTC
(In reply to Jonathan Druart from comment #6)
> Absolutely not. However it seems that it was the behaviour pre bug 27715, so
> it should be addressed on its own bug report.

Thank you Jonathan !
I opened bug 28105 to fix that issue.
Comment 9 Kyle M Hall 2021-04-16 14:03:26 UTC
Created attachment 119743 [details] [review]
Bug 28069: (bug 27715 follow-up) Fix sort for lists

Sort functionality has been broken by bug 27715. We need to specify the
table.column in the datatable init

Note that "count" needs to be handled separately (which is a bit dirty
but cannot find something better)

Test plan:
Create some lists, add contents, change owner and dates
Sort using the different attributes and confirm that it's now working

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 10 Jonathan Druart 2021-04-16 14:31:33 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 11 Fridolin Somers 2021-04-22 14:38:11 UTC
Pushed to 20.11.x for 20.11.05
Comment 12 Andrew Fuerste-Henry 2021-04-25 16:56:39 UTC
Pushed to 20.05.x for 20.05.11
Comment 13 Victor Grousset/tuxayo 2021-04-25 20:49:15 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.
Comment 14 Katrin Fischer 2022-07-17 10:44:00 UTC
*** Bug 29045 has been marked as a duplicate of this bug. ***