Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

fix(case): fixing case filtering#6059

Merged
whitdog47 merged 2 commits into
mainfrom
fix/case-filters-join-issue
Jun 18, 2025
Merged

fix(case): fixing case filtering#6059
whitdog47 merged 2 commits into
mainfrom
fix/case-filters-join-issue

Conversation

@whitdog47

@whitdog47 whitdog47 commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

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, CasePriority mappings to Project
  • Dropped explicit Case joins for IndividualContact, Assignee, and Project
  • Kept only necessary entity-to-project relations for cleanup

@whitdog47 whitdog47 requested review from Copilot and mvilanova June 16, 2025 05:05
@whitdog47 whitdog47 added the bug Something isn't working label Jun 16, 2025

Copilot AI left a comment

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.

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, CasePriority mappings to Project
  • Dropped explicit Case joins for IndividualContact, Assignee, and Project
  • 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):

@whitdog47 whitdog47 merged commit 2c8ff94 into main Jun 18, 2025
9 checks passed
@whitdog47 whitdog47 deleted the fix/case-filters-join-issue branch June 18, 2025 23:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants