Commit ee2aaa2
fix(timeplanning): admin exact-minute actual start/stop under UseOneMinuteIntervals=true (#1572)
* fix(timeplanning): admin exact-minute actual start/stop under UseOneMinuteIntervals=true (#TBD)
- Adds Start{1..5}ExactMinutes / Stop{1..5}ExactMinutes DTO fields mirroring PR #1568's pause shape
- Math.round in convertTimeToMinutes to kill the 37.6 float that produced the admin-edit error
- ApplyExactMinuteStart/Stop helpers write Start*StartedAt/Stop*StoppedAt under flag-on; cross-midnight aware
- DeriveLegacyShiftIdsFromTimestamps keeps legacy *Id columns in sync after timestamp writes (admin + worker paths)
- ComputePlanningNettoMinutes routes netto math through timestamps under flag-on (was 5-min-quantized via *Id)
- New l1m Playwright shard with 6 round-trip regression tests + 1 flag-off regression test in f shard
- CI matrix bumped to include all playwright shards on disk
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* test(timeplanning): fix new l1m playwright tests after first CI run
- Drop cross-midnight 23:55->00:30 test: dialog requires stop>start within a shift, so the case is backend-only (ApplyExactMinuteStop handles it for worker-persisted timestamps but admin can't enter it through the UI)
- Bump 5-shifts test timeout to 300s: 12 timepicker fills × ~7s each exceeds default 120s
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(timeplanning): revert Math.round in convertTimeToMinutes; isolate l1m netto test
- f1m midnight tests rely on float-value cancellation: (29.8-1)*5 = 144. Math.round broke this. The float-on-wire concern is moot since ASP.NET silently truncates and the new Start*ExactMinutes path writes the precise timestamp regardless.
- l1m netto test was reading leftover pause from prior 5-shift test in same cell; isolated by using a different cell.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(timeplanning): restore Math.round at wire + route calculatePlanHours via *ExactMinutes under flag-on
- Math.round in convertTimeToMinutes is required: float 37.6 → ASP.NET int? deserializer rejects with 400 → silent save failure (the original user-reported "error")
- f1m display tests were collateral damage from the prior Math.round revert: their flex math depends on float cancellation of (stop_float-1)*5=exact_minutes
- New approach under flag-on: calculatePlanHours derives actualMinutes from picker strings directly (toRawMinutes) instead of *Id, so display is exact-minute regardless of Math.round at the wire
- Flag-off path unchanged: still uses legacy *Id math (picker minutesGap=5 ensures integer values)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* test(timeplanning): isolate l1m netto test from prior pause-timestamp residue
The 5-shift test persists Pause1StartedAt/StoppedAt timestamps on cell0_0
(pause='00:02'); the netto-check test then reused the same cell and the
backend's ComputePlanningNettoMinutes still saw those 2 min of leftover
pause -> netto = 488 min ('8.13') vs the expected 490 min ('8.17').
A prior fix clicked the dialog's pause-delete icon, which only patches the
form pause to null. Under UseOneMinuteIntervals=true that sends
pause1ExactMinutes = null, and the backend's `if (minutes.HasValue)
ApplyExactMinutePause` guard skips ClearPauseTimestamps entirely - so the
timestamps survived.
Fix: explicitly pick pause='00:00' via the timepicker (after start/stop so
the picker's [max]=getMaxDifference resolves to a positive duration). That
sends pause1ExactMinutes = 0, which ApplyExactMinutePause routes through
ClearPauseTimestamps to null Pause1StartedAt/StoppedAt on save.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 65f8487 commit ee2aaa2
12 files changed
Lines changed: 4066 additions & 155 deletions
File tree
- .github/workflows
- eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn
- Infrastructure/Models/Planning
- Services/TimePlanningPlanningService
- eform-client
- playwright
- e2e/plugins/time-planning-pn
- f
- l1m
- helpers
- src/app/plugins/modules/time-planning-pn
- components/plannings/time-planning-actions/workday-entity
- models/plannings
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
110 | 126 | | |
111 | 127 | | |
112 | 128 | | |
| |||
Lines changed: 179 additions & 119 deletions
Large diffs are not rendered by default.
Lines changed: 52 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
169 | 221 | | |
Lines changed: 2778 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 518 additions & 0 deletions
Large diffs are not rendered by default.
0 commit comments