Skip to content

Tracking: bring the Holiday module up to web2project 5.0 #1

Open

Description

@caseysoftware

Module @ 1dc33d6 (v1.0) checked against web2project master @ 418936fe (PHP 8.3.6).

Does the module still have a purpose? Yes. Core only knows which weekdays are working days (cal_working_days). This module is the only source of date-specific exceptions: public holidays, company closures, make-up working days and staff vacations. Core already calls it from w2p_Utilities_Date::isWorkingDay(), which drives calendar shading, calcFinish() / calcDuration(), dependency shifting and the cost reports.

Today it's harmful on 5.0: activating it makes every page that calls isWorkingDay() fatal (#2).

Required to run on 5.0 / PHP 8.3

Security

Behaviour and data

5.0 conventions

Suggested order: #2–#11 except #3 (about a day: loads and is safe, automatic calendars off) → #3 (Yasumi, 1–2 days) → #13, #14, #15, #16 → decisions on #12 and #17.

Core follow-ups (not filed here):

  • The task form's JavaScript Calculate Finish Date / Duration (modules/tasks/addedit.js) uses only the weekday list, so with holidays the browser and server compute different dates.
  • Optional: replace the hard-coded modules/holiday/holiday_functions.class.php lookup in isWorkingDay() with a hook, so any module can supply non-working dates.

Effort: XS < 15 min · S < 1 h · M ≈ half a day · L = days. Found by reading the code and php -l; not yet run on a live install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions