When in the edit items table for a bib record, the date last seen and date accessioned do not sort correctly. To test, find a bib record with multiple items attached that have different dates for either accessioned and/or last seen. Select Edit - items. On the edit items screen, click on the column header for one of the dates and note that they do not sort in date order.
Created attachment 105252 [details] [review] Bug 25553: Make date columns sortable on the edit items table When editing items, the table at the top contain several columns that have date values, but they cannot be sorted by dates correctly. Test plan: Have several items with different dates in columns that contain dates, like items.dateaccessioned, items.datelastseen) Sort the column and confirm that with this patch the lines are sorted correctly
Not tested? Template process failed: undef error - : filter not found at /home/vagrant/kohaclone/C4/Templates.pm line 122 ?
Created attachment 105322 [details] [review] Bug 25553: Make date columns sortable on the edit items table When editing items, the table at the top contain several columns that have date values, but they cannot be sorted by dates correctly. Test plan: Have several items with different dates in columns that contain dates, like items.dateaccessioned, items.datelastseen) Sort the column and confirm that with this patch the lines are sorted correctly
Looks like I edited the patch after I tested it.
Created attachment 105332 [details] [review] Bug 25553: Make date columns sortable on the edit items table When editing items, the table at the top contain several columns that have date values, but they cannot be sorted by dates correctly. Test plan: Have several items with different dates in columns that contain dates, like items.dateaccessioned, items.datelastseen) Sort the column and confirm that with this patch the lines are sorted correctly Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 106086 [details] [review] Bug 25553: Make date columns sortable on the edit items table When editing items, the table at the top contain several columns that have date values, but they cannot be sorted by dates correctly. Test plan: Have several items with different dates in columns that contain dates, like items.dateaccessioned, items.datelastseen) Sort the column and confirm that with this patch the lines are sorted correctly Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Works as expected, nice improvement. Passing QA
*** Bug 25844 has been marked as a duplicate of this bug. ***
*** Bug 25863 has been marked as a duplicate of this bug. ***
Pushed to master for 20.11, thanks to everybody involved!
backported to 20.05.x for 20.05.02
backported to 19.11.x for 19.11.08
Backported to 19.05.x branch for 19.05.14
This still seems to sort wrong. I have some data like this: MariaDB [koha_kohadev]> select itemnumber, dateaccessioned from items where biblionumber = '4'; +------------+-----------------+ | itemnumber | dateaccessioned | +------------+-----------------+ | 12 | 2015-01-28 | | 13 | 2015-04-08 | | 14 | 2013-04-08 | | 18 | 2015-11-28 | +------------+-----------------+ You can see that the dateaccessioned is still not sorting right (ASC or DESC): https://snipboard.io/gtScJK.jpg https://snipboard.io/z7Av8O.jpg
Indeed Lucas, it does not work. It seems that I did not test the patch with the correct dates. I was pretty sure adding the title-string class to the th was enough. I am opening a follow-up bug report.
See bug 26233.