Summary: | Hold ratios report sorting incorrectly | ||
---|---|---|---|
Product: | Koha | Reporter: | Barton Chittenden <bartonski> |
Component: | Circulation | Assignee: | Bugs List <koha-bugs> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | abl, fridolin.somers, gmcharlt, kyle.m.hall, kyle |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11990 | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Screenshot of Hold ratios report at the reporting library
Bug 11756 - Hold ratios report sorting incorrectly Bug 11756 - Hold ratios report sorting incorrectly Bug 11756 - Hold ratios report sorting incorrectly |
The 'Items' column is also numeric, and also sorts alphabetically. Created attachment 25265 [details] [review] Bug 11756 - Hold ratios report sorting incorrectly The DataTables plugin doesn't by default take multiple columns into account when sorting. The hold ratios report presents a situation where it makes sense to sort by default based on two columns: hold count and title, since there are likely to be many titles with the same hold count. This patch adds sorting by default on holds (descending) and title (ascending). It also modifies the configuration of the title sort to exclude articles when sorting. To test, view the hold ratios report. If necessary use the filter form to reduce the minimum hold ratio and generate more results. Confirm that the correct columns can be sorted. Note that by default one can manually trigger sorting on two columns by shift-clicking the second column header. Created attachment 25300 [details] [review] Bug 11756 - Hold ratios report sorting incorrectly The DataTables plugin doesn't by default take multiple columns into account when sorting. The hold ratios report presents a situation where it makes sense to sort by default based on two columns: hold count and title, since there are likely to be many titles with the same hold count. This patch adds sorting by default on holds (descending) and title (ascending). It also modifies the configuration of the title sort to exclude articles when sorting. To test, view the hold ratios report. If necessary use the filter form to reduce the minimum hold ratio and generate more results. Confirm that the correct columns can be sorted. Note that by default one can manually trigger sorting on two columns by shift-clicking the second column header. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Created attachment 25374 [details] [review] Bug 11756 - Hold ratios report sorting incorrectly The DataTables plugin doesn't by default take multiple columns into account when sorting. The hold ratios report presents a situation where it makes sense to sort by default based on two columns: hold count and title, since there are likely to be many titles with the same hold count. This patch adds sorting by default on holds (descending) and title (ascending). It also modifies the configuration of the title sort to exclude articles when sorting. To test, view the hold ratios report. If necessary use the filter form to reduce the minimum hold ratio and generate more results. Confirm that the correct columns can be sorted. Note that by default one can manually trigger sorting on two columns by shift-clicking the second column header. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Pushed to master. Thanks Owen! Pushed to 3.14.x, will be in 3.14.07 Pushed to 3.12.x will be in 3.12.13 |
Created attachment 25237 [details] Screenshot of Hold ratios report at the reporting library In Home › Circulation › Hold ratios, When rows are sorted by the hold count, the sort is alphabetic rather than numeric. To replicate: Check out 3 titles, A, B, C, each having a single item. (The Holds Ratio report only shows titles with 3 or more holds per title) Place 3 hold on title A Place 4 holds on title B Place 10 holds in title C Bring up Hold Ratios report, and sort by the 'Holds' column When ascending, they will sort 10 | C 3 | A 4 | B They should sort 3 | A 4 | B 10 | C