-
Notifications
You must be signed in to change notification settings - Fork 106
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
validate legal/search endpoint filters #6088
base: develop
Are you sure you want to change the base?
validate legal/search endpoint filters #6088
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #6088 +/- ##
===========================================
+ Coverage 88.48% 88.51% +0.02%
===========================================
Files 82 82
Lines 9139 9156 +17
===========================================
+ Hits 8087 8104 +17
Misses 1052 1052 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job dealing with a tricky issue, and thank you for cleaning up the code!
- My understanding was FE wants all of the filters to have the same behavior—should we confirm and open a follow-up ticket for the other filters? What about type, ao_is_pending, ao_citation_require_all, case_citation_require_all—can they be updated in this PR since they also have the option in swagger —?
- If someone includes an empty string and a string it throws a 500—should we update the check_filter_exists function to not throw a 500? IE http://localhost:5000/v1/legal/search/?type=advisory_opinions&ao_requestor_type=1&ao_requestor_type=
I agree with @cnlucas. |
|
|
da4fc87
to
2b3abbd
Compare
ff65d62
to
a812c57
Compare
1035699
to
9275a85
Compare
After talking with the frontend, we agreed not to modify the existing BOOLEAN type filter validation on the backend for the following fields: ao_is_pending, ao_citation_require_all, and case_citation_require_all |
9275a85
to
1290d3e
Compare
1290d3e
to
ac9817c
Compare
Summary (required)
Resolves Make empty string behavior consistent on the legal search endpoint #6024
Update the type=all logic to return all types when the search is empty
Update
ao_requestor_type
filter from int to a stringValidate filters: type, mur_type, ao_requestor_type, primary_subject_id, secondary_subject_id
Update tests
Update docs.py
Required reviewers
2 developers
Impacted areas of the application
How to test
on local:
git checkout feature/6024-legal-search-validate-dropdown-filters
pyenv activate
run elasticsearch service
run
pytest
run
python cli.py create_index ao_index
run
python cli.py create_index arch_mur_index
run
python cli.py create_index case_index
run
python cli.py load_advisory_opinions 2023-01
(13 AO's upload to local ES service)run
python cli.py load_archived_murs
run
python cli.py load_current_murs
run
flask run
test filters
Prod:
Local
Prod:
Local
Prod:
Local
(returns results for primary_subject_id=2)
Prod:
Local
(returns results for secondary_subject_id=6)
--