Skip to content

Fix/noid/statistics range and clock - #39

Merged
karlitschek merged 5 commits into
mainfrom
fix/noid/statistics-range-and-clock
Aug 10, 2026
Merged

Fix/noid/statistics range and clock#39
karlitschek merged 5 commits into
mainfrom
fix/noid/statistics-range-and-clock

Conversation

@karlitschek

Copy link
Copy Markdown
Member

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Frank Karlitschek and others added 5 commits August 10, 2026 23:44
`ReportService::trends()` returns a month only when it has approved leave,
which is the right shape for a sum and the wrong one for everything the
statistics view did with it.

The "avg. days per month" tile divided the total by the number of months
that *appeared* in the map. Over a year in which leave fell in three
months it therefore divided by three, reporting four times the real
average — and the emptier the company's calendar, the higher the figure
climbed.

The trend chart had the same root cause with a different symptom. The
line chart spaces its points evenly by index, so a map missing January
through March drew April adjacent to December and a quiet quarter
vanished into a single ordinary step. My leave already gets this right,
filling all twelve months with zeros; the HR view now does the same.

Both now derive from the months the range actually covers. The x labels
gain the year once a range spans more than one, where two bare "Jan"
labels were previously indistinguishable, and the month list is capped so
a mistyped year cannot ask for tens of thousands of points.

Two failure paths are closed along the way. The native date inputs report
null when cleared, and every date helper here throws on it — including
one reached from a template computed, which took the whole view down
rather than one request. And a failed reload left the previous range's
figures on screen with nothing to say they were stale; it now clears them
and says so, as the other HR views already did.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Approving an edit of approved leave retires the original through
`retireSuperseded()`, which writes the cancellation directly and so never
passes through `transitionToCancelled()` — the one place a replacement is
released. The colleague who agreed to cover the old dates was therefore
left believing they still did, while somebody else was told they cover.

Only when the person actually changes. Staying silent otherwise is
deliberate: they still cover, and "no longer covering" immediately
followed by "you are covering" is noise, not information.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Six writes across the entitlement and balance services stamped
`updated_at` with `new \DateTime()`, bypassing `ClockService`. That
contradicts the rule in §3.9 — every time in the app comes from the
pinnable clock — and left the rollover, the carry-over expiry and the
bulk entitlement setter unfreezable in tests, which is exactly the code
whose behaviour depends on what day it is.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A stray import ordering on main fails `composer cs:check`, so the
lint-php-cs workflow flags it on every pull request that touches nothing
near it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@nextcloud-command nextcloud-command added the AI assisted This PR contains AI-assisted commits label Aug 10, 2026
@karlitschek
karlitschek merged commit 9a0294e into main Aug 10, 2026
14 of 15 checks passed
@karlitschek
karlitschek deleted the fix/noid/statistics-range-and-clock branch August 10, 2026 21:56
karlitschek pushed a commit that referenced this pull request Aug 11, 2026
…ints

Only the built bundles conflicted. No source file was touched by both sides: main
brought the statistics range/clock fix (#39) and the ExportController import
order, this branch brings one-click decisions, the coverage hints in the request
dialog and the My leave countdown.

js/absence-main.mjs and its source map are generated, so hand-merging the
minified output would at best be meaningless and at worst produce a bundle
matching neither side. They are regenerated from the merged source instead.

The vendor chunks (index-*, NcCheckboxRadioSwitch-*) keep their content hashes:
they are built from node_modules alone, which neither side changed. Only the app
bundle moved, which is what both sides had edited.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI assisted This PR contains AI-assisted commits

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants