| Changelog | Added
- opt-in split-service working-time model (spec split-day-working-model-2026-11):
one clock-in + one clock-out yields two employer-side partial services
when clock-out passes a configurable cut-off, with the scheduled
interruption excluded from credited time. WeekdaySchedule v2 block
schedules (1–4 blocks/day), frozen per-entry work context, deterministic
DST-aware accounting engine,
active/applied/review states.
Fully opt-in per model — legacy v1 schedules, NULL-context entries and
disabled models keep the byte-identical pre-feature calculation path.
- correction dialog split section: partial-service/worked-portion editor
with fail-closed
splitOverride validation, content-revision CAS
(baseEntryRevision → 409 SPLIT_OVERRIDE_STALE on stale decisions,
400 on malformed tokens, omission stays compatible with older clients)
- admin split-preview endpoint + model-editor split section; per-entry
segment/interruption display with plain-language reasons and an
expandable "View calculation" disclosure (web + companion app)
occ arbeitszeitcheck:verify-split-accounting replay command; exports
(CSV/PDF) carry split/segment/exclusion data with neutral interruption
wording
- month-closure status lists
review-state days as a visible warning
(with dates) without blocking finalization (spec §9.6)
- admin status page counts split-day entries needing review (spec §6)
Fixed
- split corrections submitted from the web UI were rejected
unconditionally: the dialog sent the entry's
updatedAt timestamp as
baseEntryRevision while the server required a sha256 token — the CAS
token was also format-checked but never compared. Introduces
TimeEntry::getContentRevision() (content hash of the correction basis)
echoed back by clients; stale → 409 SPLIT_OVERRIDE_STALE on the
employee submit and manager approve paths
- corrupt
work_context_json no longer masquerades as a legacy entry:
undecodable non-NULL context now surfaces state: 'context_invalid' +
SPLIT_CONTEXT_INVALID in the API summary (web + companion render the
needs-review flag), and the stored excluded_work_seconds stays
subtracted so ORM reads and SQL sums agree — interruption time is never
silently re-credited (FM-11)
Security
- correction CAS actually enforced: a split decision made against a stale
entry revision fails closed with 409 before any write, on employee and
manager paths
Added
- manager/HR can end a running approved employee absence early (end-early
with mandatory reason + CAS, audit
absence_manager_shortened, owner +
HR-office notification); elapsed days stay recorded — complements manager
cancel which removes the whole period
- absence form shows the actual vacation-day consumption for multi-day
requests ("This request uses N vacation days."), computed server-side
per the employee's working-time model
- dashboard hours-at-a-glance tiles include the approved-absence credit in
the actual hours, with a "incl. X h absence credit" footnote, matching
the overtime balance math
- prior-year carryover row renamed to "Prior-year carryover left"
(de: "Resturlaub Vorjahr") and shows "(expired)" once the transfer
deadline has passed
- people overview "Approved upcoming" column documents that it sums
approved vacation days per the employee's working-time model
- companion app: employee-absences manager surface (employee picker → list
→ flag-gated shorten/cancel with CAS + mandatory reason), server-side
day-consumption preview in create and manager record forms, absence
credit in hours glance, "Prior-year carryover left" label + "(expired)"
marker, record form defaults to server "today"
- absence payload carries additive
canShorten flag for owners
(server-computed eligibility; older servers fall back to the
isCurrent+approved derivation)
- opt-in half-day for non-vacation absence types: new admin multiselect
"Allow half days for" (
half_day_enabled_types, default ["vacation"] —
byte-identical legacy behaviour). Enabled types get the day-length control
on the manager record form, the employee request form, and the mobile
companion (manager record + employee create screens); the server debits
days = schedule weight × 0.5, rejects fractions on non-enabled types
loudly (HALF_DAY_TYPE_NOT_ENABLED) and on multi-day ranges
(HALF_DAY_RANGE_FORBIDDEN), keeps stored fractions on reason-only edits
and vacation→sick conversion, and preserves them across the
schedule-recompute repair. Custom absence types can be opted in
individually; overtime_comp, parental_leave and entitlement-bound
types stay excluded (their {0.25,0.5,0.75} contract is untouched)
- working-time-model editor section "Break rules (stricter)": per-model
break tiers (
afterHours → breakMinutes, ≤8) and minimum countable
break length — the central policy engine already merged them as
max(law, org, model); malformed stored fragments prefill tolerantly
with a cleanup hint so a save self-heals
- strict write validation for all
break_rules keys on working-time
models (tiers, floor, break_policy, auto_fallback_minutes,
allow_sunday_work) + completed key registry so near-miss names reject
with 400 instead of persisting silently; save responses echo the
normalized stored document
- opt-in
cap_overhang deduction mode (org policy deduction_mode,
model override, model ?? org ?? strict resolution): automatic breaks
record only the overhang minutes beyond the crossed threshold so the
recorded net lands exactly on it (9h31m → 31 min, net 9h00m); admin
radio with informed-consent copy + CONFIRM_REQUIRED gate on the
strict→cap transition, capped portions tail-placed [end−d, end],
flagged capped:true/deduction_mode in the breaks JSON, sub-floor
exempt from the manual countability floor, and audit-logged
(deduction_mode, capped, overhang_seconds)
- stale same-entry automatic break portions are now trimmed newest-first
when a manual break is recorded afterwards (manual reality is never
rewritten)
deductionMode additive key in capabilities.compliance and the web
complianceParams bootstrap (strict fallback for older servers);
mobile companion computes the statutory requirement on the declared
net (span − recorded breaks) inside validateManualEntry, fixing the
gross-span 45-min demand on 9h0Xm entries
Fixed
- database lock rows left behind by killed requests no longer block
catalog and admin mutations for up to an hour: acquisitions now sweep
provably-expired rows once and retry (genuine contention unchanged)
- automatic break deduction evaluated on the resulting net working
time (minimal-consistent fixpoint
required(P − d) ≤ d): a ~9h05m
presence now inserts the statutory 30 min instead of 45 — the
over-deduction reported by Cecilienstift Halberstadt; mobile companion
computes the statutory requirement on the declared net (span −
recorded breaks) instead of the gross span (9h0Xm + 30m break no
longer demands 45)
- planned-hours credit no longer double-halves a full absence day that
lands on a half-weight company holiday: the fraction is derived as
days ÷ single-day weight instead of a literal days ≈ 0.5 match (a full
sick day at weight 0.5 was credited net×0.25 instead of net×0.5)
- stored
"false"/"0" strings no longer stay truthy-active:
allow_sunday_work (Sunday-work Freibrief), weekday_schedule work
and break paid flags (an unpaid break could have been paid), and
premium-category enabled now parse strict-bool — fail closed
auto_fallback_minutes stored garbage falls back to the configured
default instead of silently clamping to 15 minutes
overtimeRules is now a bounded map-only document (≤8 KB);
break_rules documents are capped at 32 KB
- clearing every editor-owned break rule on a model now actually clears
them (paid-break flag and others previously survived an all-empty save)
- absence
days now counts the employee's weekday_schedule work days
instead of hardcoded Mon–Fri — part-time employees (e.g. 4-day model)
were debited one day too many for every Mon–Fri vacation week; a repair
step recomputes open absences (non-finalized months only, audit-logged,
half-day safe); models without a weekday schedule keep Mon–Fri counting
- manager absence recording form defaults From/To to today instead of
inheriting the one-month list-filter range
- shorten eligibility (owner + manager paths) now compares calendar dates
instead of instants — on hosts whose PHP default timezone differs from
the organisation timezone the started/ended guards could skew by up to
a day, letting the action flags and the write guard disagree
- mobile: manager absence record no longer applies the server "today"
only partially — a ref-guard was read after it was already overwritten,
so the end-date default could stay on the device date
|