Bug 13039 - Vendor search: sorting of "item count" and "biblio count" columns can be incorrect
Summary: Vendor search: sorting of "item count" and "biblio count" columns can be inco...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-07 18:53 UTC by Owen Leonard
Modified: 2015-06-04 23:32 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 13039 - Vendor search: sorting of "item count" and "biblio count" columns can be incorrect (5.58 KB, patch)
2014-10-08 12:05 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 13039 - Vendor search: sorting of "item count" and "biblio count" columns can be incorrect (5.59 KB, patch)
2014-10-14 12:56 UTC, Chris Cormack
Details | Diff | Splinter Review
[PASSED QA] Bug 13039 - Vendor search: sorting of "item count" and "biblio count" columns can be incorrect (5.86 KB, patch)
2014-10-15 13:21 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2014-10-07 18:53:36 UTC
The vendor search results page shows tables of baskets for each of those vendors. In those tables the "item count" and "biblio count" columns will be sorted incorrectly if some of the cells contain textual data (ex: "(2 cancelled)").

These columns should be configured to have a numeric sort.
Comment 1 Owen Leonard 2014-10-08 12:05:45 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2014-10-14 12:56:59 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2014-10-15 13:21:05 UTC
Created attachment 32329 [details] [review]
[PASSED QA] Bug 13039 - Vendor search: sorting of "item count" and "biblio count" columns can be incorrect

On the vendor search results page if some cells contain textual data the
"item count" and "biblio count" columns will sort incorrectly. This
patch sets an explicit numeric sort on these columns. In doing so this
patch also changes the existing column sorting configuration to use
table header cell classes instead of sorting based on index.

This patch also corrects two instances of unescaped ampersands.

To test, search for a vendor which has multiple baskets, at least one of
which should contain canceled orders. Confirm that sorting by item
count, biblio count, date, and closed all work correctly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I have not been able to see the sorting problem, but the
patch causes no regression and everything seems to work nicely.
Passes QA script and tests.

http://bugs.koha-community.org/show_bug.cgi?id=12039
Comment 4 Tomás Cohen Arazi 2014-11-19 16:36:06 UTC
Patch pushed to master.

Thanks Owen!