Conversation
Add database fields for Step 4 (Evaluation) tracking in procurement workflow: - evaluation_target_completion_date: optional target date for evaluations - evaluation_task_completed_by: user who completed the step - evaluation_date_completed: actual completion date - evaluation_notes: optional notes about evaluation Includes Alembic migration and comprehensive test coverage for evaluation step API endpoints.
Update DefaultProcurementTrackerStep.to_dict() to map evaluation fields: - evaluation_target_completion_date → target_completion_date - evaluation_task_completed_by → task_completed_by - evaluation_date_completed → date_completed - evaluation_notes → notes Ensures evaluation fields are excluded from other step types and vice versa. Adds test coverage for evaluation field mapping.
Update ProcurementTrackerStepsService to map API field names to database columns: - target_completion_date → evaluation_target_completion_date - task_completed_by → evaluation_task_completed_by - date_completed → evaluation_date_completed - notes → evaluation_notes Enables Step 4 evaluation fields to be updated via PATCH API endpoint.
Add validation rules for Step 4 completion: - EvaluationCompletionRequiredFieldsRule: validates task_completed_by and date_completed are present when completing evaluation step - Register rule in ProcurementTrackerStepsValidator for EVALUATION type - Update CompletionAuthorizationRule to handle evaluation_task_completed_by Prevents invalid Step 4 completions and ensures proper authorization.
Create Vest validation suite for evaluation step form fields: - targetCompletionDate: optional, must be MM/DD/YYYY and not in past - dateCompleted: required, must be MM/DD/YYYY and not in future - users: required task_completed_by field Includes comprehensive test coverage with 30 test cases covering format, range, required field, and edge case validations.
Create useProcurementTrackerStepFour hook to manage evaluation step: - State management for all form fields (checkbox, user, dates, notes) - API mutations for saving target date and completing step - Validation integration with suite - Error handling with alerts - Cancel modal functionality Includes comprehensive test coverage with 21 test cases covering state initialization, updates, validation, API calls, and modal behavior.
Create ProcurementTrackerStepFour component with PENDING and COMPLETED states: - PENDING: description, optional target date, checkbox, user selection, date completed, notes, cancel/complete buttons - COMPLETED: description, checkmark, TermTags grid with all saved data Includes comprehensive test coverage with 20 test cases covering both states, form interactions, validation, and button behaviors.
Integrate ProcurementTrackerStepFour component into parent AgreementProcurementTracker page. Add stepFourData extraction, conditional rendering based on feature flag, and update test mocks to include Step 4 component. Add dedicated test for Step 4 active state rendering.
Enable Step 4 (Evaluation) feature flag in production. Step 4 implementation is complete with full test coverage and integrated into the procurement tracker workflow.
Add success alerts for target completion date save and step completion to provide immediate user feedback. Update completed state to always display Target Completion Date and Notes fields with "None" fallback when not set, following Step 2 pattern for consistency. Changes: - Add success alert after saving target completion date - Add success alert after completing step 4 - Always show Target Completion Date in completed state (with "None") - Always show Notes section in completed state (with "None") - Update tests to reflect new behavior
Remove success alerts after saving target completion date and completing step 4. Follow Step 2 pattern where the UI updates immediately via RTK Query cache invalidation without showing alert notifications. Changes: - Remove success alert after target completion date save - Remove success alert after step completion - Clear local state after save to rely on server data - Update tests to reflect new behavior
…p schemas Added EVALUATION handling to both ProcurementTrackerStepResponseSchema and ProcurementTrackerStepSchema to properly serialize evaluation_* fields (target_completion_date, task_completed_by, date_completed, notes) in API responses. The schemas were missing EVALUATION cases in pre_dump and post_dump methods, causing evaluation fields to be stripped from the response. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1. Add NoPastTargetCompletionDateUpdateRule validation for EVALUATION steps
- Updated rule to support both PRE_SOLICITATION and EVALUATION step types
- Added rule to EVALUATION validators list to prevent past target dates
2. Add step ID guard to target completion date save button
- Prevents undefined stepId from being passed to API mutation
3. Complete DefaultProcurementTracker docstring with EVALUATION fields
- Documents evaluation_target_completion_date, evaluation_task_completed_by,
evaluation_date_completed, evaluation_notes in class docstring
4. Update schema comment to include EVALUATION
- ProcurementTrackerStepPatchRequestSchema now correctly lists EVALUATION
as sharing task_completed_by, date_completed, and notes fields
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Updated backend tests to expect EVALUATION step (step 4) to include step-specific fields (task_completed_by, date_completed, notes, target_completion_date) in API responses, matching the implementation. Also fixed test_complete_evaluation_step to use task_completed_by: 503 (the authenticated test user) instead of 1 (user not associated with the test agreement). Fixes: - test_get_procurement_tracker_all_step_fields now expects EVALUATION to have extra fields like steps 1-3 - test_step_to_dict_excludes_step_specific_fields_for_other_steps now expects EVALUATION to include mapped fields in to_dict() - test_complete_evaluation_step now uses correct user ID (503) that's associated with the test agreement Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…utton Changed data-cy attribute from "target-completion-save-btn" to "step-4-target-completion-save-btn" to avoid conflicts with step 2's button that has the same attribute. This fixes the E2E test failure where the Cypress selector was matching BOTH step 2 and step 4 buttons, causing the test to fail when checking if buttons are not disabled. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove Figma screenshot files (figma-step4*.png) that were accidentally committed. These reference images should be linked in tickets/documentation rather than stored in the git repository. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Implements Procurement Tracker Step 4 (Evaluation) end-to-end, adding evaluation-specific fields to the backend model/schema/service/validation and wiring a new Step 4 UI (plus hook + Vest validation) into the agreement procurement tracker flow.
Changes:
- Backend: add evaluation step columns + mapping/serialization + step-type-specific validation and API/service updates.
- Frontend: add Step 4 component + hook + Vest validation suite and integrate into the procurement tracker UI behind the Step 4 readiness flag.
- Tests: add frontend unit tests for Step 4 and extend backend procurement tracker tests for evaluation field mapping and API behavior.
Reviewed changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/types/ProcurementTrackerTypes.d.ts | Adds ProcurementTrackerEvaluationStep to the response union type. |
| frontend/src/pages/agreements/details/AgreementProcurementTracker.test.jsx | Updates agreement procurement tracker tests to account for Step 4 rendering. |
| frontend/src/pages/agreements/details/AgreementProcurementTracker.jsx | Wires in ProcurementTrackerStepFour rendering under the Step 4 readiness flag. |
| frontend/src/constants.js | Enables Step 4 readiness flag (STEP_4). |
| frontend/src/components/Agreements/ProcurementTracker/ProcurementTrackerStepFour/suite.test.js | Adds Vest suite tests for Step 4 form validation. |
| frontend/src/components/Agreements/ProcurementTracker/ProcurementTrackerStepFour/suite.js | Implements Step 4 Vest validation rules. |
| frontend/src/components/Agreements/ProcurementTracker/ProcurementTrackerStepFour/index.js | Barrel export for Step 4 component. |
| frontend/src/components/Agreements/ProcurementTracker/ProcurementTrackerStepFour/ProcurementTrackerStepFour.test.jsx | Adds component tests for PENDING/COMPLETED rendering and interactions. |
| frontend/src/components/Agreements/ProcurementTracker/ProcurementTrackerStepFour/ProcurementTrackerStepFour.jsx | Implements the Step 4 UI (PENDING + COMPLETED states). |
| frontend/src/components/Agreements/ProcurementTracker/ProcurementTrackerStepFour/ProcurementTrackerStepFour.hooks.test.js | Adds hook tests for payload creation, alerts, cancel modal, etc. |
| frontend/src/components/Agreements/ProcurementTracker/ProcurementTrackerStepFour/ProcurementTrackerStepFour.hooks.js | Implements Step 4 state management + PATCH interactions. |
| backend/ops_api/tests/ops/procurement_tracker/test_procurement_tracker_steps_api.py | Adds evaluation step API tests/fixture coverage. |
| backend/ops_api/tests/ops/procurement_tracker/test_procurement_tracker_model.py | Adds model to_dict() mapping tests for evaluation fields. |
| backend/ops_api/tests/ops/procurement_tracker/test_procurement_tracker_api.py | Updates “all step fields” API test expectations to include evaluation step fields. |
| backend/ops_api/ops/validation/rules/procurement_tracker_step.py | Adds Evaluation completion required-fields rule; extends target completion date rule to evaluation. |
| backend/ops_api/ops/validation/procurement_tracker_steps_validator.py | Registers evaluation-specific validator chain. |
| backend/ops_api/ops/services/procurement_tracker_steps.py | Adds evaluation field mapping from API fields to prefixed model columns. |
| backend/ops_api/ops/schemas/procurement_tracker_steps.py | Ensures evaluation fields are serialized/preserved appropriately for EVALUATION steps. |
| backend/models/procurement_tracker.py | Adds evaluation columns/relationship and updates to_dict() mapping/exclusion logic. |
| backend/alembic/versions/2026_03_03_2212-5b98f5ea777e_add_evaluation_step_fields_to_.py | Migration adding evaluation columns (step + step_version) and FK. |
| backend/Pipfile | Adds a new (empty) Pipfile at backend/. |
| .vscode/mcp.json | Adds VS Code MCP server config pointing at a localhost endpoint. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Addresses Copilot PR review feedback by improving code consistency and fixing validation bugs: - Add reusable helper functions (isValidDateFormat, getDateOnly, compareDateToToday) matching Step 2 pattern - Fix dual error message bug on empty required dateCompleted field by skipping format validation when empty - Remove duplicate inline date comparison logic (70+ chars per validation) - Remove personal VS Code MCP config (.vscode/mcp.json) and add to .gitignore - Remove accidental empty backend/Pipfile at wrong location All 72 Step 4 tests pass. Validation behavior unchanged, only code organization improved. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…teps - Add ProcurementTrackerEvaluationStep schema to OpenAPI spec - Update request/response schemas to document EVALUATION step fields - Add proper TypeScript types for all procurement tracker step components - Fix TypeScript errors in ProcurementTrackerStepFour and UsersComboBox - Update Steps 1-3 to use typed step data instead of generic Object Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Updated test expectations to match the improved TypeScript type safety where selectedUser is initialized as undefined instead of an empty object. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
johndeange
left a comment
There was a problem hiding this comment.
LGTM - I tested locally and it seems to work. Since @rajohnson90 worked on the procurement steps recently I would defer to him for final approval.
|
🎉 This PR is included in version 1.319.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |



What changed
Implemented Procurement Tracker Step 4 (Evaluation) for tracking the evaluation phase where OPRE completes technical evaluations, conducts negotiations, and internally selects a vendor before submitting the Final Consensus Memo to the Procurement Shop.
Key Changes:
evaluation_target_completion_date,evaluation_task_completed_by,evaluation_date_completed,evaluation_notes)Issue
Closes #1517 - Step 4 of Procurement Tracker - Evaluation
#1517
How to test
Prerequisites
docker compose up --buildTest Scenarios
1. Save Target Completion Date (Optional)
STEP_4: truein constants.js)2. Complete Step 4
3. COMPLETED State Display
4. Cancel Functionality
5. Backend Validation
task_completed_by(returns 400)date_completed(returns 400)6. Integration Tests
cd backend/ops_api && pipenv run pytest tests/ops/procurement_tracker/ -k stepcd frontend && bun run test ProcurementTrackerStepFour --watch=falsecd frontend && bun run test:e2eA11y impact
A11Y-SUPPRESSIONmetadata (owner, expires, rationale)Note: Step 4 follows the same patterns as Steps 1-3 which have already been validated for accessibility compliance (USWDS components, keyboard navigation, screen reader support).
Definition of Done Checklist
Links
.claude/plans/rippling-skipping-thacker.md(includes TDD workflow and chunk-by-chunk implementation strategy)