-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Fixes #8221 - Listing work items with API request does not filter by user ID #8337
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
base: preview
Are you sure you want to change the base?
Conversation
WalkthroughThe change adds an optional "assignee" query parameter to the issue listing endpoint that filters work items by the specified assignee ID. When provided, both the paginated results and total count queryset are filtered to return only issues assigned to that user. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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
🧹 Nitpick comments (1)
apps/api/plane/api/views/issue.py (1)
268-303: Document the newassigneequery parameter and confirm naming consistencyReading
assignee_id = request.GET.get("assignee")wires in the filter, butwork_item_docs(...parameters=[...])above still doesn’t advertise this query param. For clients relying on the OpenAPI schema or auto‑generated SDKs, this makes the feature effectively hidden.I suggest:
- Adding an explicit
assignee/assignee_idparameter to theparameterslist (via a shared constant inplane.utils.openapiif you follow that pattern).- Double‑checking that
"assignee"matches the parameter name used in the issue description/clients (e.g., whether the expected key isassignee,assignee_id, orassignees), and aligning here + in docs accordingly.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/api/plane/api/views/issue.py(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
apps/api/plane/api/views/issue.py (1)
apps/api/plane/app/views/issue/base.py (6)
get(81-188)get(740-743)get(775-786)get(1001-1076)get(1161-1171)get(1180-1340)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Cursor Bugbot
🔇 Additional comments (1)
apps/api/plane/api/views/issue.py (1)
345-351: Assignee filtering logic looks correct and keeps pagination consistentFiltering both
issue_querysetandtotal_issue_querysetbyassignees__id=assignee_idwhen the param is present correctly narrows the listed items and ensures the total count used for pagination matches what’s returned.No further changes needed here for correctness relative to the stated bug.
Description
Fixes issue #8221
Type of Change
Screenshots and Media (if applicable)
Test Scenarios
References
Note
Adds
assigneequery parameter to list work items and filters both results and total count by assignee ID.apps/api/plane/api/views/issue.py):assigneequery param and filtersissue_querysetandtotal_issue_querysetbyassignees__id.Written by Cursor Bugbot for commit 0b13a47. This will update automatically on new commits. Configure here.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.