Bug 11990

Summary: Holds ratio report (circ/reserveratios.pl) sorts numeric values as text
Product: Koha Reporter: Robin Sheat <robin>
Component: Hold requestsAssignee: Olli-Antti Kivilahti <olli-antti.kivilahti>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, jonathan.druart, olli-antti.kivilahti, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11756
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Screenshot showing the wrong sorting
Bug 11990 - Holds ratio report (circ/reserveratios.pl) sorts numeric values as text
Bug 11990 - Holds ratio report (circ/reserveratios.pl) sorts numeric values as text
[SIGNED-OFF] Bug 11990 - Holds ratio report (circ/reserveratios.pl) sorts numeric values as text
Bug 11990 - Holds ratio report (circ/reserveratios.pl) sorts numeric values as text

Description Robin Sheat 2014-03-25 03:31:39 UTC
Created attachment 26538 [details]
Screenshot showing the wrong sorting

The "holds" column in the holds ratio report sorts lexicographically rather than numerically. It probably should also sort in reverse by default, so the things with more holds show at the top.

See screenshot.
Comment 1 Olli-Antti Kivilahti 2014-10-08 12:29:09 UTC Comment hidden (obsolete)
Comment 2 Olli-Antti Kivilahti 2014-10-08 12:31:05 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2014-10-10 14:52:08 UTC Comment hidden (obsolete)
Comment 4 Olli-Antti Kivilahti 2014-10-10 15:19:58 UTC
Thanks for signing this off Owen!
Comment 5 Jonathan Druart 2014-10-11 14:36:20 UTC
Created attachment 32236 [details] [review]
Bug 11990 - Holds ratio report (circ/reserveratios.pl) sorts numeric values as text

This patch makes columns Holds, Items and "Hold ratio" to sort
numerically instead of lexicographically. Also changes default sorting
column from "Holds" to "Hold ratio" because this is a hold ratios
-report, not hold count report.

Also cleans up an excess aoColumn -definition, because aoColumns ==
aoColumnDefs without target operator. No point in defining columns
twice.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 6 Jonathan Druart 2014-10-11 14:36:42 UTC
Much more consistent now.
Comment 7 Tomás Cohen Arazi 2014-10-28 13:23:36 UTC
Patch pushed to master.

Thanks Olli!
Comment 8 Olli-Antti Kivilahti 2014-10-29 07:50:33 UTC
Must be my lucky day. Two of my patches made it to the master on the same day!