[Bug 7019] New: Circulation History Sort Order Wrong
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Bug #: 7019 Summary: Circulation History Sort Order Wrong Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Platform: All OS/Version: All Status: NEW Severity: normal Priority: P5 Component: Circulation AssignedTo: kyle.m.hall@gmail.com ReportedBy: nengard@gmail.com QAContact: koha-bugs@lists.koha-community.org CC: gmcharlt@gmail.com If any items are checked out, the return date is treated as text instead of a date, so it's sorted month first, even across years. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 --- Comment #1 from Nicole C. Engard <nengard@gmail.com> 2011-10-13 13:09:38 UTC --- Created attachment 5874 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5874 screenshot -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|kyle.m.hall@gmail.com |oleonard@myacpl.org --- Comment #2 from Owen Leonard <oleonard@myacpl.org> 2011-10-13 16:09:16 UTC --- Created attachment 5877 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5877 Proposed fix The return column sort was not using the right sort algorithm because it was confused by the combination of date data and text data ("Checked out"). I've added an explicit instruction to sort by date. The downside to this change is that checked out items are sorted with the oldest checkouts rather than the newest: Checked Out Checked Out 10/14/1988 07/14/2005 Not perfect, but an improvement over completely incorrect sorting. This patch also adds the necessary check for system dateformat preference to properly sort metric dates. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent Patch Status|--- |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #5877|0 |1 is obsolete| | --- Comment #3 from Nicole C. Engard <nengard@gmail.com> 2011-10-14 13:40:36 UTC --- Created attachment 5891 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5891 [SIGNED-OFF] Fix for Bug 7019 - Circulation History Sort Order Wrong The return column sort was not using the right sort algorithm because it was confused by the combination of date data and text data ("Checked out"). I've added an explicit instruction to sort by date. The downside to this change is that checked out items are sorted with the oldest checkouts rather than the newest: Checked Out Checked Out 10/14/1988 07/14/2005 Not perfect, but an improvement over completely incorrect sorting. This patch also adds the necessary check for system dateformat preference to properly sort metric dates. Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Signed Off -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Ian Walls <ian.walls@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ian.walls@bywatersolutions. | |com Patch Status|Signed Off |Passed QA --- Comment #4 from Ian Walls <ian.walls@bywatersolutions.com> 2011-10-14 13:46:47 UTC --- Template-only changes, string-free, improves sorting. While not perfect, it's MUCH better than what we had, so marking as Passed QA. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Patch Status|Passed QA |Patch Pushed --- Comment #5 from Chris Cormack <chris@bigballofwax.co.nz> 2011-10-15 01:20:28 UTC --- Pushed, please test -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 JA <pussman@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pussman@gmail.com --- Comment #6 from JA <pussman@gmail.com> --- Using Koha 3.08.03 with Systempref dateformat= dd/mm/yyyy the date are not well sorted. If I change it to yyyy/mm/dd it's OK. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolyn.somers@biblibre.co | |m --- Comment #7 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Very odd, datatables.js method "dt_add_type_uk_date" does not use UK format "MM/DD/YYYY" but metric format "DD/MM/YYYY". -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |ASSIGNED -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 --- Comment #8 from Nicole C. Engard <nengard@gmail.com> --- Still an issue in 3.8.8. Nicole -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 --- Comment #9 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- (In reply to comment #7)
Very odd, datatables.js method "dt_add_type_uk_date" does not use UK format "MM/DD/YYYY" but metric format "DD/MM/YYYY".
My coworkers explained me : UK = metric format (for dates only), it is US format who is "MM/DD/YYYY". -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 --- Comment #10 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Datatables looks for datas to choose the default sort algorithm. When looking at Checked Out and dates, it will use alphabetical sort algorithm. Date format must be forced for metric ('uk_date') AND us format ('date'). Note that ISO format sorted by alphabetical order is correct. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #5891|0 |1 is obsolete| | Status|ASSIGNED |Needs Signoff Assignee|oleonard@myacpl.org |fridolyn.somers@biblibre.co | |m --- Comment #11 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 15589 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15589&action=edit Proposed patch (3.11) Proposed patch for actual master (3.11.00.018). Bug is the same but technically the table uses now JQuery datatables. Ths patch forces date format for US and UK formats. See commit message -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15589|0 |1 is obsolete| | --- Comment #12 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 15710 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15710&action=edit [SIGNED-OFF] Bug 7019: Circulation History Sort Order Wrong (in datatable) The return column sort is using the right sort algorithm because it was confused by the combination of date data and text data ("Checked out"). This patch adds an explicit instruction to sort by date for UK and US formats. 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: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|PATCH-Sent (DO NOT USE) |P5 - low Status|Signed Off |Failed QA CC| |m.de.rooy@rijksmuseum.nl QA Contact|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |ity.org | --- Comment #13 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- QA Comment: I have the strong impression that this is already fixed in master. Probably by the dt_add_type_uk_date stuff? Just test in current master with dd/mm/yy. If it would sort alphabetically, it would not sort right but it does on date. Same for mm/dd/yy. Please clarify. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
Comment 13 Had you a checked out row in circulation history ? It is this text "Checked Out" which, even with dt_add_type_uk_date stuff,
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 --- Comment #14 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- prevents the library from sorting by date because column does not contain only dates. You should see that "Date due" column sorting is always fine whereas "Return date" not when having some "Checked Out". -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #15 from Jonathan Druart <jonathan.druart@biblibre.com> --- Fridolyn, I reproduce the issue and your patch fixes something, but it is not perfect. I got: Checked Out 20/04/2012 13/04/2012 19/03/2013 Checked Out 12/09/2012 Checked Out 12/09/2012 12/09/2012 In fact when the sort plugin find something else than a date, it get all mixed up. But try (members/readingrec.tt ~l.83): - [% issue.returndate | $KohaDates %] + <span title="[% issue.returndate %]">[% issue.returndate | $KohaDates %]</span> It works for me. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Derryn <derrynj@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |derrynj@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15710|0 |1 is obsolete| | --- Comment #16 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 19549 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19549&action=edit Proposed patch (revisited) Here is the patch with title argument. See commit message for more details. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #19549|0 |1 is obsolete| | --- Comment #17 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Created attachment 19707 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19707&action=edit [SIGNED-OFF] Bug 7019: Circulation History Sort Order Wrong (in datatable) 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> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #18 from Jonathan Druart <jonathan.druart@biblibre.com> --- QA comment: The last patch works great. Marked as Passed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #19707|0 |1 is obsolete| | --- Comment #19 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 19723 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19723&action=edit Bug 7019: Circulation History Sort Order Wrong (in datatable) 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> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #20 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Fridolyn! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Depends on| |5766 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #21 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This patch has been pushed to 3.12.x, will be in 3.12.4. Thanks Fridolyn! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 Sophie MEYNIEUX <sophie.meynieux@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sophie.meynieux@biblibre.co | |m --- Comment #22 from Sophie MEYNIEUX <sophie.meynieux@biblibre.com> --- Would it be possible to have it in 3.10.x ? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7019 --- Comment #23 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 22305 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=22305&action=edit Bug 7019: [3.10.x] Circulation History Sort Order Wrong (in datatable) 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" -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org