---- Reported by frederic@tamil.fr 2009-11-23 13:33:48 ---- In Tools > Calendar, 3 tables display defined holidays. Those tables use jQuery tablesorter to order by date by default. Date format is fixed by 'dateformat' syspref. But table sorter has no idea of selected date format and how to deal with it. As a consequence, tables display holidays improperly sorted by date. --- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:15 UTC --- This bug was previously known as _bug_ 3806 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=3806 Actual time not defined. Setting to 0.0
This patch removes the table sorter from all but the Exceptions table, but I'm not seeing any logical sort on those tables now. The Exceptions table still has a table sorter, and still doesn't have any code added for handling different date formats. I don't see what we gain from these changes.
Original patch: http://lists.koha-community.org/pipermail/koha-patches/2009-November/010491.html
Created attachment 6612 [details] [review] Proposed fix Adding dateformat filter to JavaScript tablesorter configurations.
Created attachment 6631 [details] [review] Patch that failed QA
QA Comment: This does not work when dateformat is metric. The list is not sorted well (in the repeatable yearly holidays). I tried dd/mm/yyyy instead of uk, but that does not work either. Problem is that the column does not contain a date but only dd/mm and that is not a valid date format. Pragmatic solution would be to add the current year in the repeatable yearly holidays. That makes the date complete, helping jQuery to sort them well. Found another related bug for the header of that table. Included a follow up to correct check on metric in template.
Created attachment 7050 [details] [review] Self-signed patch for table header Trivial one line change.
Created attachment 7353 [details] [review] Bug 3806 - Holidays table doesn't order by date correcly Adding dateformat filter to JavaScript tablesorter configurations. Follow-up adds a custom date parser for dates without year ("01/10")
Created attachment 7383 [details] [review] Signed patch
QA Comment: Did signoff already. Code looks good. Only point [cw]ould be use of tablesorter in view of new datatables approach. Since this patch refers to solving this particular problem and not refactoring code, I am marking it as Passed QA anyhow.
This fix was included in the 3.6.x branch prior to 3.6.4.