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.
Created attachment 32060 [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 cleans up an excess aoColumn -definition, because aoColumns == aoColumnDefs without target operator. No point in defining columns twice.
Created attachment 32061 [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.
Created attachment 32159 [details] [review] [SIGNED-OFF] 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>
Thanks for signing this off Owen!
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>
Much more consistent now.
Patch pushed to master. Thanks Olli!
Must be my lucky day. Two of my patches made it to the master on the same day!