Bug 29279 - Holds ratio report not sorting correctly
Summary: Holds ratio report not sorting correctly
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords:
Depends on: 28728
Blocks:
  Show dependency treegraph
 
Reported: 2021-10-19 16:47 UTC by Nick Clemens
Modified: 2021-10-26 01:05 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.05,20.11.11


Attachments
Bug 29279: Don't sort holds ratio numeric columns as 'natural' (1.46 KB, patch)
2021-10-19 16:51 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 29279: Don't sort holds ratio numeric columns as 'natural' (1.52 KB, patch)
2021-10-19 17:21 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 29279: Don't sort holds ratio numeric columns as 'natural' (1.58 KB, patch)
2021-10-19 21:39 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 29279: Use class for targets (1.62 KB, patch)
2021-10-21 08:20 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 Nick Clemens 2021-10-19 16:47:32 UTC
Bug 28728 made the 'Holds ratio' column a link to the biblio holds page

This had a side effect of breaking the sorting. That column now sorts based on the biblionumber as it includes the link HTML in the sorting

The issue seems to be that we have assigned 'Natural' sorting to that column. Natural is for a mix of letters and numbers and should only be needed for callnumber
Comment 1 Nick Clemens 2021-10-19 16:51:03 UTC
Created attachment 126529 [details] [review]
Bug 29279: Don't sort holds ratio numeric columns as 'natural'

TO test:
1 - Place a variety of holds on some records
2 - Place more holds on records with low biblionumbers and less on ones with high biblionumbers
3 - Go to Circulation->Holds ratios
4 - Set the ration to 1 and load the report
5 - Sort by the 'Holds ratio' column and note it is incorrect
6 - Apply patch
7 - Confirm sort works correctly on first three columns and call numbers column
Comment 2 Andrew Fuerste-Henry 2021-10-19 17:21:44 UTC
Created attachment 126530 [details] [review]
Bug 29279: Don't sort holds ratio numeric columns as 'natural'

TO test:
1 - Place a variety of holds on some records
2 - Place more holds on records with low biblionumbers and less on ones with high biblionumbers
3 - Go to Circulation->Holds ratios
4 - Set the ration to 1 and load the report
5 - Sort by the 'Holds ratio' column and note it is incorrect
6 - Apply patch
7 - Confirm sort works correctly on first three columns and call numbers column

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 3 Katrin Fischer 2021-10-19 21:39:23 UTC
Created attachment 126552 [details] [review]
Bug 29279: Don't sort holds ratio numeric columns as 'natural'

TO test:
1 - Place a variety of holds on some records
2 - Place more holds on records with low biblionumbers and less on ones with high biblionumbers
3 - Go to Circulation->Holds ratios
4 - Set the ration to 1 and load the report
5 - Sort by the 'Holds ratio' column and note it is incorrect
6 - Apply patch
7 - Confirm sort works correctly on first three columns and call numbers column

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Jonathan Druart 2021-10-21 08:20:54 UTC
Created attachment 126644 [details] [review]
Bug 29279: Use class for targets
Comment 5 Jonathan Druart 2021-10-21 08:21:27 UTC
If it's broken, don't let it weak, but make it more solid! ;)
Comment 6 Jonathan Druart 2021-10-21 08:33:26 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 7 Kyle M Hall 2021-10-22 15:33:58 UTC
Pushed to 21.05.x for 21.05.05
Comment 8 Fridolin Somers 2021-10-23 02:11:51 UTC
Pushed to 20.11.x for 20.11.11
Comment 9 Victor Grousset/tuxayo 2021-10-26 01:05:33 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.