Repository navigation
Open
Labels
enhancementNew feature or request
Description
Problem
Work schedules ("Arbeitszeitmodell") are a list of periods with from/to dates that members and admins edit freely. That is hard to understand and easy to get wrong (gaps, overlaps, accidental retroactive changes).
Decision (2026-10-27)
- There is the current schedule and at most one future one ("Ab 01.12.2026"). From its start day the future one becomes the current one automatically.
- Changing the schedule never rewrites the past: "Ändern" always creates the next period with a start date (default today; the earliest allowed is today for members, any open day for admins). If a future one exists, changing replaces it (confirm).
- Admins can still correct the current period retroactively (typos), but never into closed months (the closed-period guard / frozen months apply).
- Past periods stay in the data (they define past target hours) and are shown only as a collapsed, read-only "Verlauf".
Acceptance criteria
Backend
- The API exposes
current,future(nullable) andhistory(read-only) per member and org; a create/change endpoint takes{validFrom, targets…}and: closes the current period the day beforevalidFrom, replaces an existing future period, rejects a second future period, rejectsvalidFromin a closed month (members also before today). Explicit "correct current" endpoint for admins (same validation as today's update, guard applies). Deleting only the future period (members, if allowed by their rule) — past/current periods can't be deleted (admins: only by correction). - Data migration: existing periods are normalised — overlaps/gaps resolved deterministically (document the rule), open-ended last period = current or future depending on its start; more than one future period → keep the earliest, log/report the others (count in the migration output). Nothing in closed months changes (verify in a test).
- Schedule-change requests (
RequestType.WorkScheduleChange) follow the same model (request = "new schedule from date"); approval applies it through the same code. - Rule modes (Disabled/RequiresApproval/Allowed, group overrides) keep working; initial overtime unaffected.
- Remove now-unused endpoints/fields (
clearValidTo, free period editing) or keep them admin-only with a clear reason; regenerate the API client.
UI
- "Mein Arbeitszeitmodell" and the member page show one card: current targets (week view Mo–So, weekly total), an "Ab " card for the future one (with cancel), a button "Ändern ab …", and a collapsed read-only "Verlauf". Admins additionally "Aktuelles korrigieren" (with the closed-month hint).
- The form defaults to the current values, start date default today, "gleichmäßig verteilen (Mo–Fr)" stays, weekend fields stay.
- Onboarding checklist / dashboard hints still work (schedule set or not).
- German + English, 390 px.
Tests
- Backend: change from today/future date, replace future, second future rejected, closed-month start rejected, member before today rejected, admin correction blocked in closed months, future becomes current on its day (target hours of that day), migration normalisation (overlaps, gaps, several futures), requests flow, frozen closed months unaffected (Freeze closed months: figures of closed months never change afterwards #81).
- Frontend unit + e2e: change from a date, cancel future, history shows the old period, admin correction.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity