Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add agency budget filter to capital projects endpoint #402

Open
3 of 6 tasks
TylerMatteo opened this issue Jan 13, 2025 · 1 comment · May be fixed by #412
Open
3 of 6 tasks

Add agency budget filter to capital projects endpoint #402

TylerMatteo opened this issue Jan 13, 2025 · 1 comment · May be fixed by #412
Assignees

Comments

@TylerMatteo
Copy link
Collaborator

TylerMatteo commented Jan 13, 2025

Acceptance Criteria

  • capital-projects endpoint has an optional agencyBudget query parameter that allows the user to filter by agency budget
    • a capital-project is included in the response if any of its commitments are funded by the specified agency budget
  • The query parameter accepts the code for an agency budget
  • New query parameter is reflected in OpenAPI spec (regenerate files as needed)
  • Add unit and e2e tests for new query parameter

Validation

  • Return a 400 (invalid request parameter exception) if the provided code is not a valid structure for an agency budget code
  • Return a 400 (invalid request parameter exception) if the provided code does not exist in the known universe of agency budget codes
@TangoYankee
Copy link
Member

From our discussion at Sprint Planning, we talked briefly about validating that a "Project Type" actually existed. I mentioned we recently refactored this from an enum to a check constraint. This was incorrect, simply because I was referring to the "category" field of the capital project table. For project type, as in a "type" field on the "capital project" table. Well, that doesn't exist (ERD below). From the designs, I think we're referring to the Agency Budget Type.

Image

I think this is good news. It's straightforward to create an endpoint where we return the list of fields for each agency budget (Example Query Result Below). We should also expect API users to pass the "code" as the value of the "projectType" query parameter. In which case, we're using the Primary Key index and performance should be acceptable. I would suggest that we change the parameter name from "project type" to something like "agency budget code". No opinion on whether we change the name of the input in the frontend.

Image

@TylerMatteo TylerMatteo changed the title Add project type filter to capital projects endpoints Add project type filter to capital projects endpoint Jan 28, 2025
@TangoYankee TangoYankee changed the title Add project type filter to capital projects endpoint Add agency budget filter to capital projects endpoint Jan 30, 2025
@horatiorosa horatiorosa self-assigned this Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants