Skip to content

feat(OPS-2280): Foundation — schema fix, PLANNED_MOD status, history award text#5899

Merged
josbell merged 13 commits into
mainfrom
OPS-2280/pr1-foundation
Jul 9, 2026
Merged

feat(OPS-2280): Foundation — schema fix, PLANNED_MOD status, history award text#5899
josbell merged 13 commits into
mainfrom
OPS-2280/pr1-foundation

Conversation

@josbell

@josbell josbell commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

What changed

Lays the groundwork for the OPS-2280 award approval reviewer flow (PR 1 of 3).

  • Schema fix (blocking): , , , were silently dropped from AWARD step API responses due to undeclared Marshmallow fields; adds to the PATCH schema
  • PLANNED_MOD BLI status: adds enum value + alembic migration, groups it with PLANNED in all spending/funding aggregations (reporting, CANs, portfolios, BLI service) using a single IN (...) query
  • Agreement history fix: history branches were not step-type aware — AWARD steps were rendering pre-award/Director text; now emits correct "Award Approval Requested" and "Agreement Awarded" copy
  • Frontend display: adds "Planned Mod" label and tag colors to utils.js, TableTag, StatusTagList, and BLI_STATUS

Issue

#2280

How to test

Unit tests only for this PR (no new UI):

cd backend/ops_api
pipenv run pytest tests/ops/schemas/test_procurement_tracker_steps_schema.py
pipenv run pytest tests/ops/agreement/test_award_history.py
pipenv run pytest tests/ops/test_planned_mod_status.py
pipenv run pytest tests/ops/funding_summary/test_portfolio_funding_summary.py::test_get_total_funding_all_values tests/ops/funding_summary/test_portfolio_funding_summary.py::test_get_total_funding_zero_values tests/ops/funding_summary/test_portfolio_funding_summary.py::test_get_total_funding_percentage
cd frontend
bun run test --watch=false src/components/UI/TableTag/TableTag.test.jsx src/components/UI/Tag/StatusTagList.test.jsx

A11y impact

  • No accessibility-impacting changes in this PR

Storybook

  • No UI component changes in this PR

Screenshots

N/A

Definition of Done Checklist

  • OESA: Code refactored for clarity
  • OESA: Dependency rules followed
  • Automated unit tests updated and passed
  • Automated integration tests updated and passed
  • Automated quality tests updated and passed
  • Automated load tests updated and passed
  • Automated a11y tests updated and passed
  • Automated security tests updated and passed
  • 90%+ Code coverage achieved
  • Form validations updated

Links

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR lays the groundwork for OPS-2280’s award/approval workflow by fixing procurement tracker step schema serialization, introducing a new PLANNED_MOD budget line status across backend + frontend rollups, and correcting award-step agreement history text.

Changes:

  • Backend: ensure AWARD-step fields (vendor/contract/award details) are included in step API responses; add obligated_date to the PATCH schema.
  • Backend + DB: add PLANNED_MOD to the BLI status enum (Alembic) and treat it as “planned” in key funding/spending aggregations.
  • Frontend: add “Planned Mod” label + styling and add unit tests for tag rendering.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
frontend/src/helpers/utils.js Adds display text + class mapping support for PLANNED_MOD.
frontend/src/helpers/budgetLines.helpers.js Extends BLI_STATUS with PLANNED_MOD.
frontend/src/components/UI/Tag/StatusTagList.test.jsx Adds tests ensuring PLANNED_MOD displays in the status tag list.
frontend/src/components/UI/Tag/StatusTagList.jsx Adds class mapping for PLANNED_MOD tags.
frontend/src/components/UI/TableTag/TableTag.test.jsx Adds tests for PLANNED_MOD rendering in table tags.
frontend/src/components/UI/TableTag/TableTag.jsx Adds styling branch for “Planned Mod” table tag display.
backend/ops_api/tests/ops/test_planned_mod_status.py Unit tests for enum presence + grouping behavior + helper mapping.
backend/ops_api/tests/ops/schemas/test_procurement_tracker_steps_schema.py Regression tests for AWARD-step schema serialization + PATCH acceptance of obligated_date.
backend/ops_api/tests/ops/agreement/test_award_history.py Unit tests for award-step-specific agreement history titles/messages.
backend/ops_api/ops/utils/reporting_summary.py Includes PLANNED_MOD in spending statuses.
backend/ops_api/ops/utils/portfolios.py Treats PLANNED_MOD funding as planned funding in portfolio totals.
backend/ops_api/ops/utils/cans.py Treats PLANNED_MOD funding as planned funding in CAN totals.
backend/ops_api/ops/utils/budget_line_items_helpers.py Adds PLANNED_MOD to status name conversion helper.
backend/ops_api/ops/services/notification_constants.py Introduces award notification title constants and broadens module docstring.
backend/ops_api/ops/services/budget_line_items.py Includes PLANNED_MOD in BLI filter ordering and planned totals.
backend/ops_api/ops/schemas/procurement_tracker_steps.py Declares AWARD vendor/contract/award fields + adds obligated_date to patch schema.
backend/models/budget_line_items.py Adds PLANNED_MOD to BudgetLineItemStatus.
backend/models/agreement_history.py Makes procurement-step history generation step-type aware for AWARD vs PRE_AWARD.
backend/alembic/versions/2026_07_03_1200-a8b9c1d2e3f4_add_planned_mod_bli_status.py Adds PLANNED_MOD to the DB enum via raw SQL migration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/ops_api/ops/schemas/procurement_tracker_steps.py
Comment thread backend/ops_api/ops/utils/portfolios.py Outdated
Comment thread frontend/src/components/UI/TableTag/TableTag.jsx Outdated
Comment thread frontend/src/components/UI/TableTag/TableTag.test.jsx Outdated

@weimiao67 weimiao67 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review — 8 inline findings. Several relate to sites that consume BudgetLineItemStatus but weren't updated for PLANNED_MOD; because those files aren't in this diff, the comments are anchored to the closest related line here and name the exact file:line to fix in the body.

Comment thread backend/models/budget_line_items.py
Comment thread backend/models/budget_line_items.py
Comment thread backend/ops_api/ops/utils/reporting_summary.py
Comment thread backend/ops_api/ops/schemas/procurement_tracker_steps.py
Comment thread frontend/src/helpers/budgetLines.helpers.js
Comment thread frontend/src/helpers/utils.js
Comment thread backend/ops_api/ops/utils/budget_line_items_helpers.py
Comment thread backend/ops_api/ops/schemas/procurement_tracker_steps.py
@josbell josbell merged commit 2b1d7ac into main Jul 9, 2026
109 of 262 checks passed
@josbell josbell deleted the OPS-2280/pr1-foundation branch July 9, 2026 05:21
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.424.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants