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

Basic Incident Search API #191

Closed
11 tasks
alexjball opened this issue Oct 14, 2021 · 1 comment · Fixed by #195
Closed
11 tasks

Basic Incident Search API #191

alexjball opened this issue Oct 14, 2021 · 1 comment · Fixed by #195
Assignees
Labels
epic Large issues and features that involve multiple PR's or sub-issues

Comments

@alexjball
Copy link
Member

alexjball commented Oct 14, 2021

We will implement routes and queries to support basic incident search, following the flow described in figma. The focus of this work is to support the initial implementation of the frontend search flow and to set up patterns for other search flows on the backend, not to build a comprehensive API.

API Routes

We will add a new incident route:

  • GET /api/v1/incidents/search: body {location: string, start_time: string, end_time: string, description: string} returns a list of incidents matching the search criteria. Large result sets are paginated. Incidents contain data according to the backend incident data model.

Backend

  • If needed, update the backend incident model to support the frontend search flow.
  • Define routes
  • Add development seeds with fake incidents
  • Implement routes using SQLAlchemy queries
  • Test routes
  • Load spreadsheet into backend

Frontend

  • Add routes to api.ts
  • Implement mock handlers for routes using fake incidents
  • Update api.test.ts and run e2e and mock integration tests
  • Add "engineer" UI that exercises search interactions. Just text fields -> api call -> text results
  • Add functional test for engineer UI, which will be adapted for the real UI once implemented
@alexjball alexjball added the epic Large issues and features that involve multiple PR's or sub-issues label Oct 14, 2021
@alexjball alexjball added this to To do in National Police Data Collaborative MVP via automation Oct 14, 2021
@alexjball alexjball self-assigned this Oct 14, 2021
@alexjball
Copy link
Member Author

I am also handling #113 as part of this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Large issues and features that involve multiple PR's or sub-issues
Development

Successfully merging a pull request may close this issue.

1 participant