Skip to content

Manual adjustments have no effective_date — excluded from weekly/monthly summaries #2

@timpara

Description

@timpara

Problem

The adjustments table stores only created_at. As a result:

  • Weekly and monthly summaries ignore manual adjustments.
  • Only the all-time total summary reflects them.

This makes it impossible to attribute e.g. on-call comp time to the week/month it was earned.

Proposal

  1. Add an effective_date TEXT NOT NULL DEFAULT (date('now')) column to adjustments, with schema migration keyed on schema_meta.schema_version.
  2. Update POST/PUT adjustment API to accept effective_date.
  3. Roll adjustments into `/api/summary/weekly` and `/api/summary/monthly` bucketed by `effective_date`.
  4. Frontend: date picker on the adjustment form, default = today.
  5. Tests for bucketing + migration from v1 → v2.

Out of scope

Back-dating existing adjustments (will default to their created_at).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions