Bug 3806 - Holidays table doesn't order by date correcly
Summary: Holidays table doesn't order by date correcly
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: 3.6
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-23 01:33 UTC by Frédéric Demians
Modified: 2013-12-05 20:01 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Proposed fix (1.64 KB, patch)
2011-12-06 20:11 UTC, Owen Leonard
Details | Diff | Splinter Review
Patch that failed QA (1.66 KB, patch)
2011-12-07 01:12 UTC, Duncan
Details | Diff | Splinter Review
Self-signed patch for table header (1.01 KB, patch)
2012-01-05 11:30 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 3806 - Holidays table doesn't order by date correcly (2.75 KB, patch)
2012-01-27 15:04 UTC, Owen Leonard
Details | Diff | Splinter Review
Signed patch (2.88 KB, patch)
2012-01-30 08:42 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.