Skip to content

Comments

[WEB-2696] fix: unable to view intake issue#5875

Merged
pushya22 merged 1 commit intopreviewfrom
fix/new-intake-issue
Oct 21, 2024
Merged

[WEB-2696] fix: unable to view intake issue#5875
pushya22 merged 1 commit intopreviewfrom
fix/new-intake-issue

Conversation

@sharma01ketan
Copy link
Contributor

@sharma01ketan sharma01ketan commented Oct 21, 2024

[WEB-2696]

This PR aims to fix the POST endpoint for intake issues

Summary by CodeRabbit

  • New Features

    • Enhanced filtering logic for issues in the inbox, improving the accuracy of displayed labels and assignees.
  • Bug Fixes

    • Updated methods for creating, listing, and partially updating inbox issues to ensure correct data retrieval and representation.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 21, 2024

Walkthrough

The changes primarily involve the InboxIssueViewSet class in apiserver/plane/app/views/inbox/base.py. Modifications were made to the create, list, and partial_update methods to update the filtering logic for label_ids and assignee_ids. The filtering now references issue__labels and issue__assignees instead of the previous labels and assignees, ensuring accurate data retrieval and processing related to the issue model.

Changes

File Path Change Summary
apiserver/plane/app/views/inbox/base.py Updated create, list, and partial_update methods in InboxIssueViewSet to adjust filtering logic for label_ids and assignee_ids annotations. Method signatures were also updated accordingly.

Possibly related PRs

Suggested labels

🐛bug, 🌐frontend

Suggested reviewers

  • sriramveeraghanta
  • SatishGandham
  • rahulramesha

Poem

In the inbox where issues reside,
Labels and assignees now take a stride.
With filters refined, data flows bright,
Our rabbit team hops with delight! 🐇✨
Let's celebrate changes, both swift and spry,
For clearer paths, we reach for the sky!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between db91942 and 208636d.

📒 Files selected for processing (1)
  • apiserver/plane/app/views/inbox/base.py (2 hunks)
🧰 Additional context used
🔇 Additional comments (4)
apiserver/plane/app/views/inbox/base.py (4)

315-316: Improved label filtering in list method

The update to the label_ids annotation correctly references issue__labels instead of labels. This change ensures that the labels are properly filtered through the related issue model, which should resolve the issue with viewing intake issues.


325-326: Enhanced assignee filtering in list method

The update to the assignee_ids annotation improves the filtering in two ways:

  1. It correctly references issue__assignees instead of assignees, ensuring consistency with the label changes.
  2. The additional condition & Q(issue__assignees__member_project__is_active=True) ensures that only active project members are included in the assignee list.

These changes will improve data accuracy and contribute to resolving the issue with viewing intake issues.


Line range hint 315-326: Consistent improvements in create method

The updates to the label_ids and assignee_ids annotations in the create method are consistent with the changes made in the list method. These modifications ensure that:

  1. Labels are correctly referenced through issue__labels.
  2. Assignees are properly filtered using issue__assignees.
  3. Only active project members are included in the assignee list.

These consistent changes across methods will help resolve the issue with viewing intake issues and improve overall data accuracy in the inbox issue creation process.


Line range hint 315-326: Summary of changes

The modifications in this file consistently improve the filtering of labels and assignees in the InboxIssueViewSet class. These changes:

  1. Correctly reference labels and assignees through the related issue model.
  2. Ensure only active project members are included in assignee lists.
  3. Maintain consistency across the list and create methods.

These improvements should effectively address the issue of viewing intake issues as described in the PR objective. The changes enhance data accuracy and should lead to a more reliable user experience when working with inbox issues.


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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants