[Koha-bugs] [Bug 17015] New Koha Calendar

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Oct 12 17:50:37 CEST 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17015

Charles Farmer <charles.farmer at inlibro.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #77607|0                           |1
        is obsolete|                            |

--- Comment #179 from Charles Farmer <charles.farmer at inlibro.com> ---
Created attachment 80528
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80528&action=edit
Bug 17015: Code quality fixes on QA feedback

Changes:

* Koha::DiscreteCalendar->new uses a hashref instead of a hash
This meant changing every call to the Calendar and explains why this patch is
so
big. Most changes are simply adding braces to the new() call.

+ Added table encoding to atomic update
+ Added table definition to kohastructure.sql

- Removed `repeatable_holidays`, `special_holidays` from kohastructure.sql
Also added relevant DROP TABLEs to a new atomicupdate (part3)

+ Added 'override' param to Koha::DiscreteCalendar
Without this param (off by default), edit_holiday will not modify past dates.
This caused issues with some tests that required this functionality to work
properly. Adding 'override => 1' to the function call will allow past dates to
happen, but should only be called for testing.

* Holds.t, Hold.t, CalcDateDue.t have been corrected.
Prior to his patch, theses tests used hardcoded dates to test calendar
functionalities, however, DiscreteCalendar is only usable one year into the
past
by default. They have been modified to be centered around '$today'

* 'use strict; use warnings;' changed to 'use Modern::Perl;' in modified files.
* Atomic update no longer takes params
* Javascript moved to the bottom of discrete_calendar.tt
* Calendar css moved out of tt file and into new discrete_calendar.css
* All references to C4::Calendar and Koha::Calendar should now be removed
* Some comments corrected

All relevant tests passed for me on a fresh database. QA tool green.
Test plan has not changed.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list