Skip to content

Fix Org Table Filter Model Bug (CRASM-3677)#1483

Merged
cduhn17 merged 2 commits intodevelopfrom
Orgs-Filter-Model-Update-Fix-CRASM-3677
Jan 29, 2026
Merged

Fix Org Table Filter Model Bug (CRASM-3677)#1483
cduhn17 merged 2 commits intodevelopfrom
Orgs-Filter-Model-Update-Fix-CRASM-3677

Conversation

@hawkishpolicy
Copy link
Contributor

Fix Org Table Filter Model Bug (CRASM-3677)

🗣 Description

  • resolves issue where undefined values were preventing updates to the filter model's "field" and "operator" columns.
  • added helper function to check if filter model is empty.
  • returns true if all filter items have undefined, null, or empty string values.
  • if true, filter badge should not be displayed.
  • early return from all other filter related logic when model is empty.

💭 Motivation and context

🧪 Testing

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All future TODOs are captured in issues, which are referenced in code comments.
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated to reflect the changes in this PR.
  • Tests have been added and/or modified to cover the changes in this PR.
  • All new and existing tests pass.
  • Bump major, minor, patch, pre-release, and/or build versions as appropriate via the bump_version script if this repository is versioned and the changes in this PR warrant a version bump.
  • Create a pre-release (necessary if and only if the pre-release version was bumped).

✅ Pre-merge checklist

  • Revert dependencies to default branches.
  • Finalize version.

✅ Post-merge checklist

  • Create a release (necessary if and only if the version was bumped).

- resolves issue where undefined values were preventing updates to the filter model and thus ui.
- added helper function to check if filter model is empty.
- returns true if all filter items have undefined, null, or empty string values.
- if true, filter badge should not be displayed.
- early return from all other filter related logic when model is empty.
@hawkishpolicy hawkishpolicy self-assigned this Jan 29, 2026
@hawkishpolicy hawkishpolicy added bug This issue or pull request addresses broken functionality frontend labels Jan 29, 2026
- edited existing tests in cleanFilterModelItems.test.ts to reflect updated behavior of cleanFilterModelItems function.
  - modified tests to check that values are set to undefined instead of filtering out items.
- added new test file isFilterModelEmpty.test.ts to test the new isFilterModelEmpty function.
@coveralls
Copy link

Coverage Status

coverage: 43.122% (+0.04%) from 43.08%
when pulling bc098b5 on Orgs-Filter-Model-Update-Fix-CRASM-3677
into fa73a16 on develop.

@hawkishpolicy hawkishpolicy marked this pull request as ready for review January 29, 2026 18:22
Copy link
Collaborator

@cduhn17 cduhn17 left a comment

Choose a reason for hiding this comment

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

LGTM

@ameliav ameliav self-requested a review January 29, 2026 18:50
Copy link
Contributor

@ameliav ameliav left a comment

Choose a reason for hiding this comment

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

Reviewed with Thomas

@cduhn17 cduhn17 merged commit a4fea24 into develop Jan 29, 2026
17 of 18 checks passed
@cduhn17 cduhn17 deleted the Orgs-Filter-Model-Update-Fix-CRASM-3677 branch January 29, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug This issue or pull request addresses broken functionality frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants