[Bug 9108] New: Add uk/euro date sort filter to pages which require it
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Bug ID: 9108 Summary: Add uk/euro date sort filter to pages which require it Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org In order for dates in DD/MM/YYYY format to be correctly sorted by the DataTables plugin, a filter must be added in the <script> block. This filter already exists in the DataTables JS but must be explicitly imported. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 13535 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13535&action=edit Bug 9108 - Add uk/euro date sort filter to pages which require it This patch adds the JS required to enable correct sorting of dates in DD/MM/YYYY format to pages which require it. To test, set your dateformat accordingly and confirm on the affected pages that dates are sorted correctly. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Melia Meggs <melia@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |melia@bywatersolutions.com --- Comment #2 from Melia Meggs <melia@bywatersolutions.com> --- Which affected pages should I be looking at to test this patch? After applying the patch, with dateformat sys pref set to DD/MM/YYYY, dates seem to be correctly sorted on the patron details tab (http://staff-melia.test.bywatersolutions.com/cgi-bin/koha/members/moremember...) But not on the patron circulation history tab (http://staff-melia.test.bywatersolutions.com/cgi-bin/koha/members/readingrec...). In the date column on the left, it's giving me: 04/10/2012 - Oct 4 05/04/2012 - April 5 07/06/2012 - June 7 12/03/2012 - March 12 Other columns on this screen (checked out on, date due, return date) look wrong as well. But didn't I test another patch that fixed the patron circulation history tab already? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 --- Comment #3 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 13546 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13546&action=edit Bug 9108: Followup: send the dateformat value from C4::Auth - the dateformat value is send to all templates (from C4::Auth::get_template_and_user) - remove all assignment of dateformat in all .pl files - the DHTMLcalendar_dateformat variable is unused -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff CC| |jonathan.druart@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13535|0 |1 is obsolete| | --- Comment #4 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 13723 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13723&action=edit Bug 9108 - Add uk/euro date sort filter to pages which require it This patch adds the JS required to enable correct sorting of dates in DD/MM/YYYY format to pages which require it. To test, set your dateformat accordingly and confirm on the affected pages that dates are sorted correctly. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13546|0 |1 is obsolete| | --- Comment #5 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 13724 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13724&action=edit Bug 9108: Followup: send the dateformat value from C4::Auth - the dateformat value is send to all templates (from C4::Auth::get_template_and_user) - remove all assignment of dateformat in all .pl files - the DHTMLcalendar_dateformat variable is unused Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |chris@bigballofwax.co.nz Patch complexity|--- |Medium patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de QA Contact| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |paul.poulain@biblibre.com --- Comment #6 from Paul Poulain <paul.poulain@biblibre.com> --- QA comment: * I think the 1st patch is OK (untested) * I think the 2nd patch requires more work to remove now useless code. I explain: some of the following lines are removed: - "dateformat_" . C4::Context->preference('dateformat') => 1, and it's OK. However, in C4/Auth.pm, there are still references to such a construction, that was needed with HTML::Template, but can be removed with T::T The 2nd patch add in all templates the dateformat variable: in C4/Auth.pm = + $template->param( dateformat => C4::Context->preference('dateformat') ); Thus, the lines just after this new one in Auth.pm can be removed: if(C4::Context->preference('dateformat')){ if(C4::Context->preference('dateformat') eq "metric"){ $template->param(dateformat_metric => 1); } elsif(C4::Context->preference('dateformat') eq "us"){ $template->param(dateformat_us => 1); } else { $template->param(dateformat_iso => 1); } } else { $template->param(dateformat_iso => 1); } and all references to dateformat_metric, dateformat_us and dateformat_iso should be replaced : [% IF (dateformat_us ) %] to replace with: [% IF (dateformat eq 'us') %] There is something like a dozen of templates that uses this construction. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |In Discussion --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to comment #6)
QA comment: [...] Thus, the lines just after this new one in Auth.pm can be removed: if(C4::Context->preference('dateformat')){ if(C4::Context->preference('dateformat') eq "metric"){ $template->param(dateformat_metric => 1); } elsif(C4::Context->preference('dateformat') eq "us"){ $template->param(dateformat_us => 1); } else { $template->param(dateformat_iso => 1); } } else { $template->param(dateformat_iso => 1); }
and all references to dateformat_metric, dateformat_us and dateformat_iso should be replaced : [% IF (dateformat_us ) %] to replace with: [% IF (dateformat eq 'us') %]
There is something like a dozen of templates that uses this construction.
Yes but I don't want to introduce any regression and I think my patch is more flexible than your proposition. Like this anyone is allowed to use the format he wants. In the same way, the patches still submitted in BZ but not pushed will not be broken (if using one of the two formats). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 --- Comment #8 from Paul Poulain <paul.poulain@biblibre.com> --- (In reply to comment #7)
Yes but I don't want to introduce any regression and I think my patch is more flexible than your proposition. avoid introducing regression++, but my proposal would have resulted in replacing all code that can be replaced to be. And it will clean the code.
Like this anyone is allowed to use the format he wants.
I don't see why your patch is more flexible = my proposal is to go further with your patch, not changing it ! (if another QAer disagree, feel free to jump in) the syspref has only 3 values, and this should not change.
In the same way, the patches still submitted in BZ but not pushed will not be broken (if using one of the two formats). is there a case ?
I'm still thinking my proposal should be implemented, to avoid piling code (I know there is a lot in Koha already, not a reason to continue...) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |jonathan.druart@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13724|0 |1 is obsolete| | --- Comment #9 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 14189 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14189&action=edit Bug 9108: Followup: send the dateformat value from C4::Auth - the dateformat value is send to all templates (from C4::Auth::get_template_and_user) - remove all assignment of dateformat in all .pl files - the DHTMLcalendar_dateformat variable is unused - Remove "all" occurrences (those I found!) of dateformat_*
From now the only way to get the date format is a string comparaison (dateformat == "metric")
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|Medium patch |Large patch --- Comment #10 from Chris Cormack <chris@bigballofwax.co.nz> --- Hmm this follow up is now pretty massive to test. I actually would have preferred the first follow up. And this new code clean up to be on it's own bug. Perhaps in a series of smaller patches, as it stands to test you have to test about 30 pages to sign off. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 --- Comment #11 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to comment #10)
Hmm this follow up is now pretty massive to test. I actually would have preferred the first follow up. And this new code clean up to be on it's own bug.
Perhaps in a series of smaller patches, as it stands to test you have to test about 30 pages to sign off.
Hi Chris, After a discussion with Paul, I mark the last patch as obsolete in order to keep my first one. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14189|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13724|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #12 from Jonathan Druart <jonathan.druart@biblibre.com> --- All proposed patches are signed off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13723|0 |1 is obsolete| | Attachment #13724|0 |1 is obsolete| | --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 14572 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14572&action=edit [SIGNED-OFF] Bug 9108 - Add uk/euro date sort filter to pages which require it This patch adds the JS required to enable correct sorting of dates in DD/MM/YYYY format to pages which require it. To test, set your dateformat accordingly and confirm on the affected pages that dates are sorted correctly. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Resolved conflict in serials/serials-search.tt. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 14573 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14573&action=edit [SIGNED-OFF] Bug 9108: Followup: send the dateformat value from C4::Auth - the dateformat value is send to all templates (from C4::Auth::get_template_and_user) - remove all assignment of dateformat in all .pl files - the DHTMLcalendar_dateformat variable is unused Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Fixed conflicts: - opac/sco/sco-main.pl - reports/acquisitions_stats.pl - tools/cleanborrowers.pl All tests pass, perlcritic problems appeared in some files before and after these patches were applied. Checked sorting in following pages: - acqui/addorderiso2709.tt - list of staged imports in acq - acqui/histsearch.tt - sorting of dates in acq search result list - acqui/invoices.tt - billing date in list of invoices in acq - acqui/lateorders.tt - list of late orders in acq - acqui/ordered.tt - ordered titles and estimated costs for a fund - acqui/parcels.tt - receive shipment page - acqui/spent.tt - received titles and actual costs for a fund ... - serials-search.tt - subscription search result list ... - opac/sco/sco-main.tt - due dates in list of checked out items - reports/acquisitions-stats.tt - date searches, display of dates - tools/cleanborrowers.tt - tools.holidays.tt - different views of dates library is closed, adding dates Checked dates display according to system preference everywhere and searching, entering dates etc. still worked as expected. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |9349 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #15 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch has been pushed to master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |9508 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 --- Comment #16 from Chris Cormack <chris@bigballofwax.co.nz> --- Patches do not apply cleanly to 3.10.x or 3.8.x please rebase for those branches if you want it in them. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=11059 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolyn.somers@biblibre.co | |m --- Comment #17 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 23139 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23139&action=edit [3.10.X] Bug 9108 - Add uk/euro date sort filter to pages which require it First patch for old stable 3.10.X branch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 --- Comment #18 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 23141 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23141&action=edit [3.10.X] Bug 9108: Followup: send the dateformat value from C4::Auth Second patch for old stable 3.10.X branch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |Needs Signoff --- Comment #19 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- 3.10.X patches need signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #20 from David Cook <dcook@prosentient.com.au> --- I've started trying to test the 3.10.x patches, but it's quite the slog trying to find the pages affected, and then not necessarily having the data to test them and having to create that data. This one is just too laborious for not enough reward, as it's already in master. Sorry :/. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 --- Comment #21 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- (In reply to David Cook from comment #20) No problem, thanks for trying -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|master |3.10 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |RESOLVED Resolution|--- |FIXED --- Comment #22 from David Cook <dcook@prosentient.com.au> --- I'm closing this one, since it was pushed to master ages ago, and is now out of date in light of some of Owen's latest DataTable patches. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9108 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|3.10 |3.12 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org