[Bug 31331] New: OPAC suggestions table doesn't sort correctly by suggeestiondate in some dateformats
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31331 Bug ID: 31331 Summary: OPAC suggestions table doesn't sort correctly by suggeestiondate in some dateformats Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org To recreate: 1. I used the following suggestiondates: MariaDB [koha_kohadev]> select suggesteddate from suggestions; +---------------+ | suggesteddate | +---------------+ | 2022-01-03 | | 2022-08-09 | | 2022-02-22 | | 2021-01-21 | +---------------+ 2. Set the dateformat system preference to 'mm/dd/yyyy'. 3. Try sorting the suggestion table bu date, ascending and descending, it is not right. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31331 --- Comment #1 from Lucas Gass <lucas@bywatersolutions.com> --- I think the best solution/easiest solution is to use the data-order attribute on the suggesteddate column. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31331 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31331 --- Comment #2 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 138919 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138919&action=edit Bug 31331: Add data-order attribute for better sorting of dates To test: 1. I used the following suggestiondates: MariaDB [koha_kohadev]> select suggesteddate from suggestions; +---------------+ | suggesteddate | +---------------+ | 2022-01-03 | | 2022-08-09 | | 2022-02-22 | | 2021-01-21 | +---------------+ 2. Set the dateformat system preference to 'mm/dd/yyyy'. 3. Try sorting the suggestion table by date, ascending and descending, it is not right. 4. Apply patch 5. Try sorting by date again, ascending and descending, it should now sort correctly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31331 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Assignee|oleonard@myacpl.org |lucas@bywatersolutions.com Severity|enhancement |minor -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31331 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31331 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #138919|0 |1 is obsolete| | --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 138924 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138924&action=edit Bug 31331: Add data-order attribute for better sorting of dates To test: 1. I used the following suggestiondates: MariaDB [koha_kohadev]> select suggesteddate from suggestions; +---------------+ | suggesteddate | +---------------+ | 2022-01-03 | | 2022-08-09 | | 2022-02-22 | | 2021-01-21 | +---------------+ 2. Set the dateformat system preference to 'mm/dd/yyyy'. 3. Try sorting the suggestion table by date, ascending and descending, it is not right. 4. Apply patch 5. Try sorting by date again, ascending and descending, it should now sort correctly. Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31331 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #138924|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 139051 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139051&action=edit Bug 31331: Add data-order attribute for better sorting of dates To test: 1. I used the following suggestiondates: MariaDB [koha_kohadev]> select suggesteddate from suggestions; +---------------+ | suggesteddate | +---------------+ | 2022-01-03 | | 2022-08-09 | | 2022-02-22 | | 2021-01-21 | +---------------+ 2. Set the dateformat system preference to 'mm/dd/yyyy'. 3. Try sorting the suggestion table by date, ascending and descending, it is not right. 4. Apply patch 5. Try sorting by date again, ascending and descending, it should now sort correctly. Signed-off-by: Owen Leonard <oleonard@myacpl.org> 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=31331 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com CC| |martin.renvoize@ptfs-europe | |.com --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Works as described, Passing QA. Note: I was surprised to see this is a straight-up datatable and not a KohaTable yet. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31331 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|OPAC suggestions table |OPAC suggestions table |doesn't sort correctly by |doesn't sort correctly by |suggeestiondate in some |suggestiondate in some |dateformats |dateformats -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31331 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.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=31331 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org