Show gross earned leave by generating rule #67

Closed
opened 2026-10-07 00:24:21 +02:00 by nessar · 4 comments
nessar commented 2026-10-07 00:24:21 +02:00 (Migrated from 172.24.0.1:8928)

Blocked by: #65, #64

Parent

What to build

The statistics popup shows all leave earned by the calculated plan before consumption, with a breakdown by the rules that generated it, including entitlements that were fully used.

Source: the agreed Plan Statistics Popup spec for #3 and #29, including #8. Follow the domain glossary and ADRs 0004, 0006, and 0007.

Acceptance criteria

  • Display gross earned leave from every applicable generating rule, including Samedi Malin, with a per-rule breakdown whose quantities sum to the total.
  • A plan earning 3 days and consuming 2 reports 3 earned days. Fully consumed earned entitlements remain included even when absent from remaining balances; generating a future entitlement does not require consuming it inside the horizon.
  • Repeated satisfied occurrences contribute their generated quantities once per generating rule and occurrence. Distinct rules retain separate attribution even when their names match or they share contributing dates. Occurrences satisfied by declarations, placements, or both use the finalized entitlement semantics from #64.
  • Include only entitlements becoming available strictly after the producing calculation's captured Europe/Paris calendar date. Availability before or on that date is excluded; availability after the planning horizon is included. Use the finalized availability after the complete generating time-off period, including later period extensions.
  • Only entitlements generated by the final or retained valid plan contribute. Rejected candidates, abandoned branches, provisional earnings, and hypothetical alternatives cannot inflate the total.
  • Rule labels come from the producing calculation's immutable rule names and attribution. Renaming or deleting pending rules, changing balances, or crossing a calendar-date boundary after calculation does not change this result.
  • Carry reliable gross quantities and generating-rule attribution with complete outcomes and retained partial plans through direct planning, worker delivery, and cancellation checkpoints. Reuse #64's captured calculation date; do not recapture it on opening the popup, reconstruct earnings from remaining balances or trace history, or infer attribution by parsing balance identifiers.
  • A valid plan with no qualifying earnings shows a total of 0. Trace readiness and failure do not gate the total or breakdown, and partial plans retain their prominent label.
  • Fixed-clock behavior tests verify partial and full consumption, multiple rules and repeated occurrences, shared contributing dates, availability before/on/after the reference date and beyond the horizon, period extensions, original rule names, and cancellation retaining a different state from the latest candidate. Assert the rendered total and breakdown through the direct and worker paths and run the repository's existing tests, lint, formatting, type checks, and production build.

Presentation proposal, not an agreed requirement: show contributing rules only, omitting zero-earning rows. The total and all positive contributions are required regardless of that display choice.

Blocked by

Blocked by: #65, #64 ## Parent - [#3](https://gitea.nessar.fr/nessar/vac-optimizer/issues/3) - [#29](https://gitea.nessar.fr/nessar/vac-optimizer/issues/29) ## What to build The statistics popup shows all leave earned by the calculated plan before consumption, with a breakdown by the rules that generated it, including entitlements that were fully used. Source: the agreed Plan Statistics Popup spec for [#3](https://gitea.nessar.fr/nessar/vac-optimizer/issues/3) and [#29](https://gitea.nessar.fr/nessar/vac-optimizer/issues/29), including [#8](https://gitea.nessar.fr/nessar/vac-optimizer/issues/8). Follow the domain glossary and ADRs 0004, 0006, and 0007. ## Acceptance criteria - [ ] Display gross earned leave from every applicable generating rule, including Samedi Malin, with a per-rule breakdown whose quantities sum to the total. - [ ] A plan earning 3 days and consuming 2 reports 3 earned days. Fully consumed earned entitlements remain included even when absent from remaining balances; generating a future entitlement does not require consuming it inside the horizon. - [ ] Repeated satisfied occurrences contribute their generated quantities once per generating rule and occurrence. Distinct rules retain separate attribution even when their names match or they share contributing dates. Occurrences satisfied by declarations, placements, or both use the finalized entitlement semantics from #64. - [ ] Include only entitlements becoming available strictly after the producing calculation's captured Europe/Paris calendar date. Availability before or on that date is excluded; availability after the planning horizon is included. Use the finalized availability after the complete generating time-off period, including later period extensions. - [ ] Only entitlements generated by the final or retained valid plan contribute. Rejected candidates, abandoned branches, provisional earnings, and hypothetical alternatives cannot inflate the total. - [ ] Rule labels come from the producing calculation's immutable rule names and attribution. Renaming or deleting pending rules, changing balances, or crossing a calendar-date boundary after calculation does not change this result. - [ ] Carry reliable gross quantities and generating-rule attribution with complete outcomes and retained partial plans through direct planning, worker delivery, and cancellation checkpoints. Reuse #64's captured calculation date; do not recapture it on opening the popup, reconstruct earnings from remaining balances or trace history, or infer attribution by parsing balance identifiers. - [ ] A valid plan with no qualifying earnings shows a total of 0. Trace readiness and failure do not gate the total or breakdown, and partial plans retain their prominent label. - [ ] Fixed-clock behavior tests verify partial and full consumption, multiple rules and repeated occurrences, shared contributing dates, availability before/on/after the reference date and beyond the horizon, period extensions, original rule names, and cancellation retaining a different state from the latest candidate. Assert the rendered total and breakdown through the direct and worker paths and run the repository's existing tests, lint, formatting, type checks, and production build. Presentation proposal, not an agreed requirement: show contributing rules only, omitting zero-earning rows. The total and all positive contributions are required regardless of that display choice. ## Blocked by - [#65 — Open plan statistics for calculated leave usage](https://gitlab.nessar.fr/nessar/vac-optimizer/-/work_items/65). - [#64 — Appliquer les motifs IF_THEN et les droits acquis aux jours déclarés](https://gitea.nessar.fr/nessar/vac-optimizer/issues/64), which establishes finalized earned entitlements and the fixed Europe/Paris calculation-date cutoff.
nessar commented 2026-10-07 00:25:40 +02:00 (Migrated from 172.24.0.1:8928)

mentioned in issue #8

mentioned in issue #8
nessar commented 2026-10-07 00:25:44 +02:00 (Migrated from 172.24.0.1:8928)

mentioned in issue #29

mentioned in issue #29
admin-backup commented 2026-10-07 23:16:32 +02:00 (Migrated from 172.24.0.1:8928)

mentioned in commit da08ee054d

mentioned in commit da08ee054dcebf2d4e5a716e664fe3b868e90c39
nessar (Migrated from 172.24.0.1:8928) closed this issue 2026-10-08 21:09:30 +02:00

Preserved GitLab #67 history: source attribution, exact timestamps, discussion grouping and review positions. Historical diff snapshots: 0; visible source notes: 3.

gitlab-35-issue-67.md (SHA-256 5f907c464ae12562a336ba4a4649c26e2ddfb3cb4b90c49e9faf2348b6f2c639)

gitlab-35-issue-67.json (SHA-256 f35919325813a5778c3b8f34954471839b0a314d251b3a4fb4e5ce6f861e2205)

Old CI job execution and reports are omitted. Original source files and rollback backups remain protected.

<!-- gitlab-to-gitea-history:35:Issue:67 --> Preserved GitLab #67 history: source attribution, exact timestamps, discussion grouping and review positions. Historical diff snapshots: 0; visible source notes: 3. [gitlab-35-issue-67.md](https://gitea.nessar.fr/attachments/6d19834c-bc06-4820-92d7-9a503bbd11ad) (SHA-256 `5f907c464ae12562a336ba4a4649c26e2ddfb3cb4b90c49e9faf2348b6f2c639`) [gitlab-35-issue-67.json](https://gitea.nessar.fr/attachments/020cec36-5936-4c9f-8d1d-2a1cb09a8d21) (SHA-256 `f35919325813a5778c3b8f34954471839b0a314d251b3a4fb4e5ce6f861e2205`) Old CI job execution and reports are omitted. Original source files and rollback backups remain protected.
gitea-emergency added this to the Development project 2026-10-11 22:14:31 +02:00
gitea-emergency moved this to Closed in Development on 2026-10-11 22:14:31 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nessar/vac-optimizer#67