Skip to content

Fix/noid/sick leave type and job cutoffs - #42

Merged
karlitschek merged 4 commits into
mainfrom
fix/noid/sick-leave-type-and-job-cutoffs
Aug 12, 2026
Merged

Fix/noid/sick leave type and job cutoffs#42
karlitschek merged 4 commits into
mainfrom
fix/noid/sick-leave-type-and-job-cutoffs

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 4 commits August 12, 2026 14:07
The method's own docblock said it was "used by the create flow to warn
about (not block) negative balances". Nothing called it. That warning is
a client-side one — §5.1 puts it in the request dialog, and
RequestDialog.vue computes it from the balance the store already holds —
so the method was not an unfinished feature but a pointer at the wrong
layer, complete with a local that was assigned and never read.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ReportController::sickLeave() has always accepted a typeId, and
ReportService documents that "HR can pass an explicit type instead" of
the seeded `sick` key — but no caller ever sent one, so on an instance
with no type keyed `sick` the page could only show a table of zeroes and
say the type was missing.

api.js now forwards typeId and the view offers a type picker, cleared by
default so the server keeps resolving `sick` on its own.

The three labels that named sickness outright now follow whatever the
report says it aggregated, so picking Unpaid leave no longer leaves the
page reading "days of sick leave". In the default case they resolve to
the same wording as before. The options come from the full leave-type
list rather than the enabled subset, for the same reason HrAbsences
does it: a disabled type can still have history worth reporting on.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
created_at holds UTC — ClockService::now() is deliberately UTC, because
a timestamp records an instant rather than a day. The escalation and
reminder jobs, equally deliberately, work their cut-offs out on the
server's calendar: which day a request falls on is a company question.

Formatting such a cut-off straight into the query wrote its local
wall-clock and silently shifted every bound by the server's UTC offset.
Escalation only slipped by hours, but the reminder band is exactly one
working day wide, so off Berlin's or Auckland's offset it reminded a
cohort a day early or skipped it altogether.

Converted in the mapper, which is the layer that knows what the column
holds, so both queries are covered at once. Rebuilt from the timestamp
rather than via setTimezone() so a caller's mutable DateTime is never
altered underneath it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@karlitschek
karlitschek merged commit 7639d30 into main Aug 12, 2026
15 of 16 checks passed
@karlitschek
karlitschek deleted the fix/noid/sick-leave-type-and-job-cutoffs branch August 12, 2026 12:26
@nextcloud-command nextcloud-command added the AI assisted This PR contains AI-assisted commits label Aug 12, 2026
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