Bug 3806

Summary: Holidays table doesn't order by date correcly
Product: Koha Reporter: Frédéric Demians <f.demians>
Component: ToolsAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: minor    
Priority: P5 - low CC: chris, duncan, indradg, m.de.rooy, paul.poulain
Version: 3.6   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Proposed fix
Patch that failed QA
Self-signed patch for table header
Bug 3806 - Holidays table doesn't order by date correcly
Signed patch

Description Chris Cormack 2010-05-21 01:15:13 UTC


---- 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

Comment 1 Owen Leonard 2010-08-11 15:04:12 UTC
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.
Comment 3 Owen Leonard 2011-12-06 20:11:46 UTC Comment hidden (obsolete)
Comment 4 Duncan 2011-12-07 01:12:41 UTC Comment hidden (obsolete)
Comment 5 Marcel de Rooy 2012-01-05 11:30:18 UTC
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.
Comment 6 Marcel de Rooy 2012-01-05 11:30:57 UTC Comment hidden (obsolete)
Comment 7 Owen Leonard 2012-01-27 15:04:08 UTC Comment hidden (obsolete)
Comment 8 Marcel de Rooy 2012-01-30 08:42:00 UTC
Created attachment 7383 [details] [review]
Signed patch
Comment 9 Marcel de Rooy 2012-01-30 09:46:38 UTC
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.
Comment 10 Jared Camins-Esakov 2012-05-23 12:57:10 UTC
This fix was included in the 3.6.x branch prior to 3.6.4.