Fixes #8221 - Listing work items with API request does not filter by user ID
Description
Fixes issue #8221
Type of Change
- [ ] Bug fix
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.
- Backend/API
- Work Items list (
apps/api/plane/api/views/issue.py):
- Accepts
assigneequery param and filtersissue_querysetandtotal_issue_querysetbyassignees__id.- Keeps existing ordering (priority/state/labels/assignees) behavior intact.
Written by Cursor Bugbot for commit 0b13a47567689ca52d0fad55c9e753829f70b1cc. This will update automatically on new commits. Configure here.
Summary by CodeRabbit
- New Features
- Added assignee filtering for the issue list. You can now filter and view only items assigned to specific users.
โ๏ธ Tip: You can customize this high-level summary in your review settings.
Walkthrough
The 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
| Cohort / File(s) | Summary |
|---|---|
Assignee filtering for issue listings apps/api/plane/api/views/issue.py |
Added optional "assignee" GET parameter to IssueListCreateAPIEndpoint that filters issue_queryset and total_issue_queryset by assignees__id when provided |
Estimated code review effort
๐ฏ 2 (Simple) | โฑ๏ธ ~8 minutes
- Single file modification affecting one endpoint
- Addition follows existing filter pattern with minimal logic density
- Consider verifying filter applies correctly to both paginated and total querysets
Poem
๐ฐ An assignee filter hops into view, Narrowing issues to just what's due, One query parameter, clean and neat, Makes filtering assignments quite sweet! ๐
Pre-merge checks and finishing touches
โ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Description check | โ ๏ธ Warning | The description is largely incomplete. While it mentions the issue reference and includes screenshots, it lacks critical sections: detailed description of changes, properly checked Type of Change, and test scenarios. | Complete the description section with details about what was changed and why. Check the Bug fix checkbox. Add test scenarios describing how the assignee filter was verified to work correctly. |
โ Passed checks (2 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | โ Passed | The title clearly and specifically describes the main change: adding assignee filtering to work item API listing, which directly addresses the referenced issue #8221. |
| Docstring Coverage | โ Passed | Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. |
โจ Finishing touches
- [ ] ๐ Generate docstrings
๐งช Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
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 @coderabbitai help to get the list of available commands and usage tips.