Bug 29279

Summary: Holds ratio report not sorting correctly
Product: Koha Reporter: Nick Clemens <nick>
Component: ReportsAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrewfh, fridolin.somers, jonathan.druart+koha, kyle, victor
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.05,20.11.11
Bug Depends on: 28728    
Bug Blocks:    
Attachments: Bug 29279: Don't sort holds ratio numeric columns as 'natural'
Bug 29279: Don't sort holds ratio numeric columns as 'natural'
Bug 29279: Don't sort holds ratio numeric columns as 'natural'
Bug 29279: Use class for targets

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.