Skip to content

226890 search filters improvements#5912

Open
Jeeziorny wants to merge 10 commits intodevelopfrom
226890-search-filters-improvements
Open

226890 search filters improvements#5912
Jeeziorny wants to merge 10 commits intodevelopfrom
226890-search-filters-improvements

Conversation

@Jeeziorny
Copy link
Copy Markdown
Contributor

@Jeeziorny Jeeziorny commented Apr 16, 2026

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 16, 2026

Codecov Report

❌ Patch coverage is 95.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.34%. Comparing base (567c491) to head (127ab46).
⚠️ Report is 39 commits behind head on develop.

Files with missing lines Patch % Lines
src/hope/apps/household/filters.py 92.00% 1 Missing and 1 partial ⚠️

❌ Your patch check has failed because the patch coverage (95.00%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5912      +/-   ##
===========================================
+ Coverage    92.28%   92.34%   +0.06%     
===========================================
  Files          494      494              
  Lines        34362    34388      +26     
  Branches      3603     3606       +3     
===========================================
+ Hits         31711    31756      +45     
+ Misses        1904     1883      -21     
- Partials       747      749       +2     
Flag Coverage Δ
e2e 52.61% <37.50%> (+<0.01%) ⬆️
unit 92.04% <95.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Jeeziorny Jeeziorny force-pushed the 226890-search-filters-improvements branch from dea4b11 to f2d638e Compare April 17, 2026 13:27
@Jeeziorny Jeeziorny marked this pull request as ready for review April 20, 2026 07:24
@Jeeziorny Jeeziorny force-pushed the 226890-search-filters-improvements branch from 912962d to 127ab46 Compare April 20, 2026 07:24
@Jeeziorny
Copy link
Copy Markdown
Contributor Author

Codecov check fail is false positive:
image

program = Program.objects.filter(code=program_code, business_area__slug=business_area_slug).first()
if config.IS_ELASTICSEARCH_ENABLED and program and program.status == Program.ACTIVE:
return self._phone_search_es(qs, digits, program)
return self._phone_search_db(qs, digits)
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.

We should also pass program to db_search and use it in filters

Comment on lines +436 to +437
if not value:
return qs
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.

FYI that's the place that is not covered by tests:

Image

Actually this code is never reached - without value or with empty string, the method is not executed at all - that's why test_phone_filter_empty_value_ignored also does not cover this

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 this pull request may close these issues.

2 participants