Closed fec-jli closed 1 month ago
Attention: Patch coverage is 88.61789%
with 14 lines
in your changes missing coverage. Please review.
Project coverage is 86.73%. Comparing base (
83e299e
) to head (fee2946
). Report is 4 commits behind head on develop.
Files with missing lines | Patch % | Lines |
---|---|---|
webservices/legal_docs/current_cases.py | 93.39% | 7 Missing :warning: |
webservices/resources/legal.py | 56.25% | 7 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
query to get MUR_ADR disposition category list:
with q as (SELECT DISTINCT fecmur.event.event_name AS event_name FROM fecmur.calendar INNER JOIN fecmur.event USING (event_id) INNER JOIN fecmur.entity USING (entity_id) LEFT JOIN (SELECT detail_key AS entity_id, master_key AS settlement_id FROM fecmur.relatedobjects INNER JOIN fecmur.settlement ON fecmur.relatedobjects.master_key = fecmur.settlement.settlement_id WHERE relation_id = 1 ) AS relatedobjects ON relatedobjects.entity_id = fecmur.calendar.entity_id LEFT JOIN fecmur.settlement USING (settlement_id) LEFT JOIN (SELECT * FROM fecmur.violations WHERE stage = 'Closed' ) AS violations ON violations.entity_id = fecmur.calendar.entity_id WHERE event_name NOT IN ('Complaint/Referral', 'Disposition') ORDER BY fecmur.event.event_name ASC ) SELECT row_number() OVER () AS idx,event_name FROM q WHERE event_name NOT IN ('Complaint/Referral', 'Disposition') ORDER BY event_name ASC
Summary
Add filter by mur_disposition_category_id in the /legal/search/ endpoint. Here is the list of Mur dispostion category list
Required reviewers
2 devs
Impacted areas of the application
/legal/search/
Completion criteria
How to test
1)Checkout branch 2)Setup local ES 3Upload legal doc on local ES. These commands for reference:
python cli.py create_index case_index
python cli.py delete_index case_index
python cli.py load_adrs
python cli.py load_admin_fines
python cli.py load_current_murs
you can terminate(Ctr+C) in the middle of loading.4)
pytest
andflask run
5)Test urls http://127.0.0.1:5000/v1/legal/search/?type=murs&mur_disposition_category_id=12 http://127.0.0.1:5000/v1/legal/search/?type=murs&mur_disposition_category_id=7
http://127.0.0.1:5000/v1/legal/search/?type=murs&mur_disposition_category_id=12&mur_disposition_category_id=7
on dev: https://fec-dev-api.app.cloud.gov/v1/legal/search?api_key=DEMO_KEY&type=murs&mur_disposition_category_id=1
multi-filter: https://fec-dev-api.app.cloud.gov/v1/legal/search?api_key=DEMO_KEY&type=murs&mur_disposition_category_id=1&mur_disposition_category_id=12