Summary: | OPAC suggestions table doesn't sort correctly by suggestiondate in some dateformats | ||
---|---|---|---|
Product: | Koha | Reporter: | Lucas Gass <lucas> |
Component: | OPAC | Assignee: | Lucas Gass <lucas> |
Status: | CLOSED FIXED | QA Contact: | Martin Renvoize <martin.renvoize> |
Severity: | minor | ||
Priority: | P5 - low | CC: | martin.renvoize |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
22.11.00
|
|
Attachments: |
Bug 31331: Add data-order attribute for better sorting of dates
Bug 31331: Add data-order attribute for better sorting of dates Bug 31331: Add data-order attribute for better sorting of dates |
Description
Lucas Gass
2022-08-09 14:27:05 UTC
I think the best solution/easiest solution is to use the data-order attribute on the suggesteddate column. Created attachment 138919 [details] [review] 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. Created attachment 138924 [details] [review] 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> Created attachment 139051 [details] [review] 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> Works as described, Passing QA. Note: I was surprised to see this is a straight-up datatable and not a KohaTable yet. Pushed to master for 22.11. Nice work everyone, thanks! |