Bug 7019: fix sorting by return date in Circulation History
authorFridolyn SOMERS <fridolyn.somers@biblibre.com>
Thu, 11 Jul 2013 08:24:07 +0000 (10:24 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 17 Jul 2013 15:03:32 +0000 (15:03 +0000)
commitdbd6befa5d0d52e5ff10b78deef4f839127e30db
treed6fe57848cd2ffec019a91636ebd916143dc5474
parent4043df439541ec8ba28363abc74d1677479a8869
Bug 7019: fix sorting by return date in Circulation History

The "return date" column sort is not using the date sort algorithm because it is
confused by the combination of date data and text data ("Checked out").

This patch adds the use of datatable "title-string" sort type.
With that, the date in ISO format are used for sorting and because
letters are before numbers, "Checked out" rows are more recent than any date.

Test plan :
- set dateformat syspref to "dd/mm/yyyy"
- Go to members/readingrec.pl for a borrower having a old issues and
checked out issues
=> Check that sort of "Return date" is correct.
For example :
With patch :
  20/01/2011
  06/03/2011
  20/03/2011
  Checked Out
Without patch :
  06/03/2011
  20/01/2011
  20/03/2011
  Checked Out
- Test also with dateformat syspref "mm/dd/yyyy"

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt