Bug 11990 - Holds ratio report (circ/reserveratios.pl) sorts numeric values as text
Summary: Holds ratio report (circ/reserveratios.pl) sorts numeric values as text
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Olli-Antti Kivilahti
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-25 03:31 UTC by Robin Sheat
Modified: 2015-06-04 23:33 UTC (History)
4 users (show)

See Also:
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 (142.77 KB, image/png)
2014-03-25 03:31 UTC, Robin Sheat
Details
Bug 11990 - Holds ratio report (circ/reserveratios.pl) sorts numeric values as text (1.81 KB, patch)
2014-10-08 12:29 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Bug 11990 - Holds ratio report (circ/reserveratios.pl) sorts numeric values as text (1.94 KB, patch)
2014-10-08 12:31 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 11990 - Holds ratio report (circ/reserveratios.pl) sorts numeric values as text (2.04 KB, patch)
2014-10-10 14:52 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 11990 - Holds ratio report (circ/reserveratios.pl) sorts numeric values as text (2.05 KB, patch)
2014-10-11 14:36 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 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!