您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

5.0KB

Story 1.13: Municipality Prior-Cycle Service Defaults View

Status: done

Story

As a a client services staff member, I want to view municipality-specific service defaults from prior election cycles as a read-only reference, so that I can reference proven configurations when setting up new election-cycle jobs in Epic 2.

Acceptance Criteria

  1. Given a municipality has at least one completed election-cycle job When a client services user views the prior-cycle defaults panel Then the most recent cycle's service configurations are displayed as read-only reference data
  2. Given a municipality has multiple prior cycles When the defaults panel is viewed Then the most recent cycle is shown by default with a cycle selector control to navigate older cycles
  3. Given no prior cycles exist for a municipality When defaults are requested Then the system displays a clear “No prior cycle defaults available” state with guidance to create the first cycle And all data in this view is read-only — the apply-to-new-job action is out of scope for this story and delivered in Epic 2 (Story 2.4)

Tasks / Subtasks

  • Implement story behavior in aligned backend/frontend modules (AC: #1)
    • Add or update API/service/UI components required by the story scope
    • Keep legacy Access entities read-only and route writes to extension-layer structures
  • Cover acceptance criteria #2 in implementation and tests (AC: #2)
    • Add validation/error handling and UX state updates as needed
  • Cover acceptance criteria #3 in implementation and tests (AC: #3)
    • Add validation/error handling and UX state updates as needed
  • Validate and document completion evidence
    • Verify build/tests for touched modules
    • Capture changed files and any migration/config implications

Dev Notes

  • Follow Epic 1 architecture constraints: ASP.NET Core + React separation, RBAC-aware patterns, and immutable legacy tables.
  • Reuse shared component and workflow patterns defined in UX and architecture docs; avoid parallel custom implementations.
  • Keep changes scoped to this story; do not pull forward Epic 2+ features.

Project Structure Notes

  • Backend: Campaign_Tracker.Server/
  • Frontend: campaign-tracker-client/
  • Story artifacts: _bmad-output/implementation-artifacts/

References

  • Story source: _bmad-output/planning-artifacts/epics.md (Epic 1 / Story 1.13)
  • Architecture constraints: _bmad-output/planning-artifacts/architecture.md
  • UX patterns: _bmad-output/planning-artifacts/ux-design-specification.md

Dev Agent Record

Agent Model Used

GPT-5 Codex

Debug Log References

  • Story generated from epic source and architecture/UX planning artifacts.
  • 2026-05-07: Added failing backend repository/controller tests and frontend contract tests for prior-cycle defaults before implementation.
  • 2026-05-07: Verified targeted prior-cycle tests, full backend test suite, frontend unit tests, frontend lint, and frontend production build.

Completion Notes List

  • Story context created and marked ready-for-dev.
  • Implemented a read-only extension-layer prior-cycle defaults repository keyed by municipality JCode, with most-recent-first completed-cycle ordering.
  • Added authenticated client-services GET endpoint for municipality prior-cycle defaults, resolving profile ID to JCode and returning empty-state guidance when no prior cycles exist.
  • Added frontend prior-cycle defaults contract and a read-only defaults modal on the municipality profile table with cycle selector support for older cycles.
  • Kept apply-to-new-job behavior out of scope; the view has no mutating API or UI action.
  • Validation evidence: dotnet test Campaign_Tracker.Server.Tests\Campaign_Tracker.Server.Tests.csproj /p:UseAppHost=false /p:BaseOutputPath="..\_bmad-output\test-bin\" passed 155 tests; npm test passed 45 tests; npm run lint passed; npm run build passed.

File List

  • _bmad-output/implementation-artifacts/1-13-municipality-prior-cycle-service-defaults-view.md
  • _bmad-output/implementation-artifacts/sprint-status.yaml
  • Campaign_Tracker.Server/Program.cs
  • Campaign_Tracker.Server/Controllers/MunicipalityPriorCycleDefaultsController.cs
  • Campaign_Tracker.Server/Municipalities/IMunicipalityPriorCycleDefaultsRepository.cs
  • Campaign_Tracker.Server/Municipalities/InMemoryMunicipalityPriorCycleDefaultsRepository.cs
  • Campaign_Tracker.Server/Municipalities/MunicipalityPriorCycleDefaults.cs
  • Campaign_Tracker.Server.Tests/MunicipalityPriorCycleDefaultsControllerTests.cs
  • Campaign_Tracker.Server.Tests/MunicipalityPriorCycleDefaultsRepositoryTests.cs
  • campaign-tracker-client/src/municipalities/MunicipalityProfilePanel.tsx
  • campaign-tracker-client/src/municipalities/municipalityContracts.ts
  • campaign-tracker-client/src/municipalities/municipalityContracts.test.ts
  • campaign-tracker-client/src/workspace/WorkspaceShell.tsx

Change Log

  • 2026-05-07: Implemented municipality prior-cycle service defaults view and moved story to review.

Powered by TurnKey Linux.