[Bug 28349] New: Date sorting incorrect reports in en-GB
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 Bug ID: 28349 Summary: Date sorting incorrect reports in en-GB Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Reports Assignee: koha-bugs@lists.koha-community.org Reporter: david.roberts@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org When using the en-GB translation, column sorting of saved reports (../cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved) doesn't work properly when sorting by date. For example, sorting by date created could result in the following order: 02/04/2019 02/04/2020 02/08/2018 03/04/2019 This is presumably because the UK date format is dd/mm/yyyy, not mm/dd/yyyy. It works correctly in the en translation. Sorting by non-date columns in en-GB also works correctly. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |minor -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 Lucy Vaux-Harvey <lucy.vaux-harvey@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucy.vaux-harvey@ptfs-europ | |e.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 Holly <hc@interleaf.ie> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hc@interleaf.ie -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=27994 --- Comment #1 from Fridolin Somers <fridolin.somers@biblibre.com> --- Looks like it is fixed by Bug 27994 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 --- Comment #2 from Fridolin Somers <fridolin.somers@biblibre.com> --- I see it is Bug 26234 that removed : { "sType": "title-string", "aTargets" : [ "title-string" ] } -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=26234 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Hi David, that seems to work correctly for me on master, with en-GB and dateformat=dd/mm/yyyy On which version of Koha do you see that problem? Can you recreate on a sandbox? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Fridolin Somers from comment #2)
I see it is Bug 26234 that removed : { "sType": "title-string", "aTargets" : [ "title-string" ] }
Not related and not a bug, title-string has been moved to columns_settings.inc (not removed). -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=26234 | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 --- Comment #5 from Fridolin Somers <fridolin.somers@biblibre.com> --- I reproduce this bug on our demo actually 20.11.09 : https://intranet-demo.biblibre.com/ -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |26234 Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |com Summary|Date sorting incorrect |Date sorting incorrect in |reports in en-GB |some tables Severity|minor |normal Status|NEW |ASSIGNED Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26234 [Bug 26234] Default DataTables must know our own classes -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 125870 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125870&action=edit Bug 28349: (bug 26234 follow-up) Correct wrong array merge Bug 26234 allowed to remove the different classes we use in aoColumnDefs for sorting columns of table using DT. However there is a terrible mistake, the merge of existing aoColumnDefs array with the default one is totally wrong: $.extend(true, new_parameters, default_column_defs); When we actually want $.extend(true, new_parameters["aoColumnDefs"], default_column_defs); We want to merge default_column_defs with the existing aocolumnDefs. This bug only exists when there is an existing aocolumnDefs. See commit d3f3a55e0b1544ebcd3166d141e126a4324baab1 It happens on: * cataloguing/z3950_search.tt * reports/guided_reports_start.tt * serials/subscription-detail.tt * opac-course-reserves.tt * opac-detail.tt However this bug has been hidden as we have in master related bug from bug 27945, which removes title-string. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Problem and fix can be easily tested on v20.11.09 (sql reports), but this patch is for master and 21.05 as well. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125870|0 |1 is obsolete| | --- Comment #8 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 125875 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125875&action=edit Bug 28349: (bug 26234 follow-up) Correct wrong array merge Bug 26234 allowed to remove the different classes we use in aoColumnDefs for sorting columns of table using DT. However there is a terrible mistake, the merge of existing aoColumnDefs array with the default one is totally wrong: $.extend(true, new_parameters, default_column_defs); When we actually wanted to do: $.extend(true, new_parameters["aoColumnDefs"], default_column_defs); But it's still wrong, extend is doing a deep copy and the array will be replaced by the other one, whereas we want to append. We want to merge default_column_defs with the existing aocolumnDefs, this patch is doing it explicitely. This bug only exists when there is an existing aocolumnDefs. See commit d3f3a55e0b1544ebcd3166d141e126a4324baab1 It happens on: * cataloguing/z3950_search.tt * reports/guided_reports_start.tt * serials/subscription-detail.tt * opac-course-reserves.tt * opac-detail.tt However this bug has been hidden as we have in master related bug from bug 27945, which removes title-string. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29218 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29218 [Bug 29218] "hidden" class is not working for DT if column visibility button is used -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 --- Comment #9 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126179 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126179&action=edit Bug 28349: [DO NOT PUSH] Recreate the problem You can apply this patch to recreate the problem. NoSort is removed from the default DT settings but we are passing it from the KohaTable constructor. We are then expecting the first column (the checkbox) to not be orderable. Without the fix, the parameter is not taken into account (ie. not correctly merged into the DT default parameters). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 Janet McGowan <janet.mcgowan@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |janet.mcgowan@ptfs-europe.c | |om -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125875|0 |1 is obsolete| | --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 127028 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127028&action=edit Bug 28349: (bug 26234 follow-up) Correct wrong array merge Bug 26234 allowed to remove the different classes we use in aoColumnDefs for sorting columns of table using DT. However there is a terrible mistake, the merge of existing aoColumnDefs array with the default one is totally wrong: $.extend(true, new_parameters, default_column_defs); When we actually wanted to do: $.extend(true, new_parameters["aoColumnDefs"], default_column_defs); But it's still wrong, extend is doing a deep copy and the array will be replaced by the other one, whereas we want to append. We want to merge default_column_defs with the existing aocolumnDefs, this patch is doing it explicitely. This bug only exists when there is an existing aocolumnDefs. See commit d3f3a55e0b1544ebcd3166d141e126a4324baab1 It happens on: * cataloguing/z3950_search.tt * reports/guided_reports_start.tt * serials/subscription-detail.tt * opac-course-reserves.tt * opac-detail.tt However this bug has been hidden as we have in master related bug from bug 27945, which removes title-string. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |martin.renvoize@ptfs-europe | |.com --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- That was somewhat fun to reproduce and test.. I'm going to be bold and go for straight QA here.. it's a clear fix, with no regressions, once I wrapped my head around it. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 --- Comment #12 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28349 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Resolution|--- |FIXED Status|Pushed to master |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org