This repository was archived by the owner on Sep 3, 2025. It is now read-only.
fix(case): fixing case filtering#6059
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refines the apply_filter_specific_joins mapping by removing several unused case-related entries to fix case filtering behavior.
- Removed redundant
CaseType,CaseSeverity,CasePrioritymappings toProject - Dropped explicit
Casejoins forIndividualContact,Assignee, andProject - Kept only necessary entity-to-project relations for cleanup
Comments suppressed due to low confidence (3)
src/dispatch/database/service.py:463
- Removing the
(CaseType, "Project")mapping means filters on case types tied to projects will no longer generate the necessary JOIN, which may break existing queries. Consider handling this relationship elsewhere or adding a fallback path.
(CaseType, "Project"): (Project, False),
src/dispatch/database/service.py:464
- Since case severity and priority mappings were removed, add or update tests to verify filtering by case severity/priority still behaves as intended or raises a clear error.
(CaseSeverity, "Project"): (Project, False),
src/dispatch/database/service.py:461
- [nitpick] It would help to document why the case-related join entries were removed (e.g., in a docstring or CHANGELOG) so future maintainers understand the intent behind this cleanup.
def apply_filter_specific_joins(model: Base, filter_spec: dict, query: orm.query):
mvilanova
approved these changes
Jun 18, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR refines the
apply_filter_specific_joinsmapping by removing several unused case-related entries to fix case filtering behavior.CaseType,CaseSeverity,CasePrioritymappings toProjectCasejoins forIndividualContact,Assignee, andProject