Bug 27168 - Most popular doesn't always sort correctly
Summary: Most popular doesn't always sort correctly
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 9916
  Show dependency treegraph
 
Reported: 2020-12-08 11:27 UTC by Alexandra Speer
Modified: 2022-06-06 20:25 UTC (History)
6 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.02


Attachments
Screenshot of proper search (235.66 KB, image/jpeg)
2020-12-09 14:54 UTC, Alexandra Speer
Details
Screenshots of wrong results (307.02 KB, image/jpeg)
2020-12-09 14:55 UTC, Alexandra Speer
Details
Bug 27168: Sort most popular by number of issues desc (1.27 KB, patch)
2020-12-09 15:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27168: Sort most popular by number of issues desc (1.32 KB, patch)
2020-12-09 23:10 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 27168: Sort most popular by number of issues desc (1.38 KB, patch)
2020-12-22 11:56 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 27168: [20.05.x] Sort most popular by number of issues desc (1.22 KB, patch)
2021-01-12 08:47 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandra Speer 2020-12-08 11:27:02 UTC
Most popular should always sort most popular items on top, but it doesn't. 

- Turn on: OpacTopissue

Open the most popular page in the OPAC.
-> The records should appear correctly. 

Now change 
- Show the top filter to 20 titles and
- Acquired in the last to No limit
and Submit
-> The results are no longer sorted correctly by Checkouts.
Comment 1 Jonathan Druart 2020-12-09 13:16:56 UTC
Hello Alexandra, I don't recreate this behaviour on master. On which exact version of 20.05.x did you try?

Can you submit a the two screens?
Comment 2 Jonathan Druart 2020-12-09 13:17:15 UTC
(In reply to Jonathan Druart from comment #1)
> Can you submit a the two screens?

Can you submit a screenshot of the two screens?
Comment 3 Alexandra Speer 2020-12-09 14:54:26 UTC
Created attachment 114283 [details]
Screenshot of proper search

Version tested: 20.05.05
Comment 4 Alexandra Speer 2020-12-09 14:55:23 UTC
Created attachment 114284 [details]
Screenshots of wrong results
Comment 5 Jonathan Druart 2020-12-09 15:26:56 UTC
Coming from 
  commit 1b6452bc5422c998e0127822c5b3c47ff77355d1
  Bug 9916: (follow-up) restore default sort order for OPAC "most popular" page
Comment 6 Jonathan Druart 2020-12-09 15:29:40 UTC
Created attachment 114286 [details] [review]
Bug 27168: Sort most popular by number of issues desc

It seems that there is a weird behavior when the title is used as a
second sort

Test plan:
Turn on OpacTopissue
Make sure the table always displays entries sorted by number of issues
desc
Comment 7 Lucas Gass 2020-12-09 23:10:17 UTC
Created attachment 114292 [details] [review]
Bug 27168: Sort most popular by number of issues desc

It seems that there is a weird behavior when the title is used as a
second sort

Test plan:
Turn on OpacTopissue
Make sure the table always displays entries sorted by number of issues
desc

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 8 Katrin Fischer 2020-12-09 23:25:53 UTC
Thx Lucas!
Comment 9 Victor Grousset/tuxayo 2020-12-22 11:56:05 UTC
Created attachment 114600 [details] [review]
Bug 27168: Sort most popular by number of issues desc

It seems that there is a weird behavior when the title is used as a
second sort

Test plan:
Turn on OpacTopissue
Make sure the table always displays entries sorted by number of issues
desc

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 10 Jonathan Druart 2021-01-04 13:10:53 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 11 Fridolin Somers 2021-01-07 14:00:18 UTC
Pushed to 20.11.x for 20.11.02
Comment 12 Andrew Fuerste-Henry 2021-01-11 21:49:12 UTC
Doesn't apply cleanly to 20.05, please rebase if needed
Comment 13 Katrin Fischer 2021-01-11 21:58:57 UTC
This bug was initially found in 20.05, so a rebase would be great.
Comment 14 Jonathan Druart 2021-01-12 08:47:02 UTC
Created attachment 115049 [details] [review]
Bug 27168: [20.05.x] Sort most popular by number of issues desc

It seems that there is a weird behavior when the title is used as a
second sort

Test plan:
Turn on OpacTopissue
Make sure the table always displays entries sorted by number of issues
desc
Comment 15 Jonathan Druart 2021-01-12 08:47:13 UTC
Patch rebased but not tested.