Repository navigation
[WEB-10178] fix: scope intake duplicate_to to the project - #10324
Conversation
Both the web and the public API intake serializers now reject a duplicate_to work item that does not belong to the intake item's project.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
Description
duplicate_toon the intake serializers (web API and public API) was a plain foreign key with no scope check, and the response echoes the referenced work item's details. An intake item could be pointed at a work item in another project or workspace.Both serializers now have a
validate_duplicate_tothat rejects a work item outside the intake item's own project.The web app's duplicate picker already searches the same project only.
Type of Change
Screenshots and Media (if applicable)
Test Scenarios
plane/tests/contract/app/test_intake_duplicate_to_scope_app.pyandplane/tests/contract/api/test_intake_duplicate_to_scope.py: aduplicate_tofrom another project or another workspace returns 400 on each surface; a same-project value still works. 6 passed; the four out-of-scope cases fail without the fix.References
Created with Claude Code
Summary by CodeRabbit