Skip to content

Comments

[NDH-811] Fix Bug with Zip Code Filters Leading Zero#386

Merged
spopelka-dsac merged 14 commits intomainfrom
isaacmilarky/NDH-811-zipcode-filter-bug-fix
Feb 11, 2026
Merged

[NDH-811] Fix Bug with Zip Code Filters Leading Zero#386
spopelka-dsac merged 14 commits intomainfrom
isaacmilarky/NDH-811-zipcode-filter-bug-fix

Conversation

@IsaacMilarky
Copy link
Collaborator

module-name: One line description of your change (less than 72 characters)

Jira Ticket #NDH-811

Problem

There is a bug with the behavior of zip code filters in the api where it ignores leading zeroes. This is a problem since many zip codes start with 0.

Solution

Change the full address filter to use SearchQuery with "websearch" to avoid issues with postgres tokenization. Also just use a direct filter match on the filter that just checks zipcode.

Result

Summary:

  • Change all of the filter sets that have address filters to use SearchQuery websearch
  • Change all of the filter sets that have zipcode filters to use direct filter matching
  • Add tests to make sure that we are properly filtering leading zeroes.

Test Plan

Run new tests that test leading zeroes.

Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
…ts accordingly

Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Isaac Milarsky and others added 3 commits February 6, 2026 11:06
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
…com:CMS-Enterprise/npd into isaacmilarky/NDH-811-zipcode-filter-bug-fix
Copy link
Collaborator

@sachin-panayil sachin-panayil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! pulled, ran and tested

Copy link
Contributor

@spopelka-dsac spopelka-dsac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just a few notes on tests

Isaac Milarsky added 3 commits February 9, 2026 09:54
Signed-off-by: Isaac Milarsky <isaac.milarsky@hhs.cms.gov>
Signed-off-by: Isaac Milarsky <isaac.milarsky@hhs.cms.gov>
Signed-off-by: Isaac Milarsky <isaac.milarsky@hhs.cms.gov>
Isaac Milarsky added 4 commits February 11, 2026 10:44
Signed-off-by: Isaac Milarsky <isaac.milarsky@hhs.cms.gov>
Signed-off-by: Isaac Milarsky <isaac.milarsky@hhs.cms.gov>
Signed-off-by: Isaac Milarsky <isaac.milarsky@hhs.cms.gov>
@spopelka-dsac spopelka-dsac enabled auto-merge (squash) February 11, 2026 19:34
@spopelka-dsac spopelka-dsac merged commit 6ca1656 into main Feb 11, 2026
12 checks passed
@spopelka-dsac spopelka-dsac deleted the isaacmilarky/NDH-811-zipcode-filter-bug-fix branch February 11, 2026 19:37
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.

3 participants