-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WEB-2177] fix: handling the archived module ids in the issue list and issue detail endpoints #5343
Conversation
WalkthroughThe recent changes enhance the data filtering logic across multiple components of the application. By adding conditions to exclude archived modules in various queries, the updates improve data integrity and relevance. This refinement ensures that only active modules are considered in aggregations, leading to more accurate and meaningful results in the application's responses. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant API
participant Database
Client->>API: Request data
API->>Database: Query with filters
Database-->>API: Return non-archived data
API-->>Client: Send filtered response
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- apiserver/plane/app/views/inbox/base.py (1 hunks)
- apiserver/plane/app/views/issue/base.py (3 hunks)
- apiserver/plane/app/views/view/base.py (1 hunks)
- apiserver/plane/utils/grouper.py (3 hunks)
Additional comments not posted (4)
apiserver/plane/utils/grouper.py (1)
32-35
: Enhance filtering criteria for module IDs.The added condition
Q(issue_module__module__archived_at__isnull=True)
in theannotations_map
ensures that only non-archived modules are included in the results. This change aligns with the PR objectives to filter out archived modules.apiserver/plane/app/views/view/base.py (1)
226-227
: Refine module ID aggregation logic.The addition of
Q(issue_module__module__archived_at__isnull=True)
to thefilter
in theArrayAgg
function ensures that only non-archived modules are considered. This aligns with the PR objectives to exclude archived modules from the dataset.apiserver/plane/app/views/inbox/base.py (1)
163-164
: Improve module ID filtering logic.The inclusion of
Q(issue_module__module__archived_at__isnull=True)
in theArrayAgg
filter ensures that only non-archived modules are aggregated. This change supports the PR's goal of excluding archived modules from the results.apiserver/plane/app/views/issue/base.py (1)
440-441
: Approved: Exclude archived modules inretrieve
method.The added filter
Q(issue_module__module__archived_at__isnull=True)
ensures that archived modules are excluded from themodule_ids
annotation. This aligns with the PR objectives and improves data relevance.
Summary
This pull request removes the module_ids which are archived from the issue, module, and cycle issues endpoint and issue detail endpoint
Plane Issue:
[WEB-2177]
Summary by CodeRabbit
New Features
Bug Fixes
Style