Bug 28069 - Can't sort lists on staff client
Summary: Can't sort lists on staff client
Status: Signed Off
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: Testopia
URL:
Keywords:
Depends on: 27715
Blocks: 28105
  Show dependency treegraph
 
Reported: 2021-04-01 13:43 UTC by Séverine Queune
Modified: 2021-04-07 08:57 UTC (History)
1 user (show)

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


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

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.