CRASM-3605 Retired Organization Displaying On Dashboard#1519
Merged
Conversation
cduhn17
approved these changes
Jul 1, 2026
cduhn17
left a comment
Collaborator
There was a problem hiding this comment.
Looks good, bulk of this review was done 6/30 in PR review meeting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🗣 Description
Updates:
This update ensures that retired organizations are no longer displayed on the CyHy Dashboard front end. Previously, retired organizations were still included in API responses, causing them to appear in UI filters and results.
The organization filtering logic was updated in:
backend/src/xfd_django/xfd_api/helpers/filter_helpers.py
Specifically:
Added Q(retired=False) to the apply_organization_filters() function.
Ensures all organization queries automatically exclude retired entries.
No other filtering behavior was modified.
💭 Motivation and context
This change ensures that retired organizations are no longer visible on the CyHy Dashboard, improving data accuracy and preventing users from interacting with outdated organization records.
🧪 Testing
Before the change
Logged into the CyHy Dashboard.
Navigated to Admin Hub → Manage Orgs → Filters.
Searched for a known retired organization that has been set to retired in DB .
Result: The retired organization appeared in the search results, meaning the dashboard still displayed organizations marked as retired.
After the change
Repeated the same steps on the updated backend.
Searched for the same retired organization.
Result: The organization no longer appeared in the filter results.
Confirmed that active (non‑retired) organizations still appear correctly and all other filter functionality behaves as expected.
📷 Screenshots (if appropriate)
Before change:

After change:


✅ Pre-approval checklist
bump_versionscript if this repository is versioned and the changes in this PR warrant a version bump.✅ Pre-merge checklist
✅ Post-merge checklist