Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[WEB-5537]refactor: rename IssueUserProperty to ProjectUserProperty and update related references#8206

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
pablohashescobar wants to merge8 commits intopreview
base:preview
Choose a base branch
Loading
fromchore-user-property-migrations

Conversation

@pablohashescobar
Copy link
Member

@pablohashescobarpablohashescobar commentedDec 1, 2025
edited by coderabbitaibot
Loading

Description

  • renameIssueUserProperty toProjectUserProperty
  • add fieldssort_order andpreferences toProjectUserProperty
  • migration script for migrating data fromProjectMembers toProjectUserProperty
  • change references ofIssueUserProperty toProjectUserProperty
  • added fieldallowed_rate_limit toAPITokens

Type of Change

  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring

Test Scenarios

  • project workitem grouping and filtering
  • project sorting in the sidebar

References

WEB-5537


Note

RenamesIssueUserProperty toProjectUserProperty across code, addspreferences andsort_order with migrations and endpoint updates, and introducesallowed_rate_limit onAPIToken.

  • DB & Models:
    • RenameIssueUserPropertyProjectUserProperty; move/define model indb/models/project.py with new fields:preferences,sort_order and updated constraints/related names.
    • Migrations0113,0114 handle table rename, new fields, backfill fromProjectMember.preferences/sort_order, and adjust uniqueness; setworkspace_id=None for non-service API tokens.
    • Addallowed_rate_limit toAPIToken model.
  • API & Views:
    • ReplaceIssueUserDisplayPropertyEndpoint withProjectUserDisplayPropertyEndpoint; PATCH now upserts viaProjectUserPropertySerializer and returns 200.
    • Update project creation/invite/member flows to createProjectUserProperty records; seed task bulk-creates them.
    • Update URLs to.../user-properties/ endpoint and all imports/serializers toProjectUserPropertySerializer.
  • Tests:
    • Adjust contract tests to assertProjectUserProperty creation.

Written byCursor Bugbot for commitab9a6b4. This will update automatically on new commits. Configurehere.

Summary by CodeRabbit

  • New Features

    • API tokens gain a configurable rate-limit setting.
    • Per-project preferences, display settings and sort order are now stored and applied.
  • Bug Fixes

    • Data migrations preserve existing user preferences and sort order and reconcile API token/workspace associations.
  • Tests

    • Tests updated to validate per-project preference and display behavior.

✏️ Tip: You can customize this high-level summary in your review settings.

@pablohashescobarpablohashescobar requested review fromCopilot anddheeru0198 and removed request forCopilotDecember 1, 2025 09:30
@makeplane
Copy link

Linked to Plane Work Item(s)

This comment was auto-generated byPlane

@coderabbitai
Copy link
Contributor

coderabbitaibot commentedDec 1, 2025
edited
Loading

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

User-project properties renamed/moved from IssueUserProperty to ProjectUserProperty with new fields and constraints; migrations added (schema + data) to migrate data; serializers, views, URLs, tasks, management commands, and tests updated; APIToken.allowed_rate_limit field added.

Changes

Cohort / File(s)Summary
Model definitions & exports
apps/api/plane/db/models/issue.py,apps/api/plane/db/models/project.py,apps/api/plane/db/models/__init__.py
RemovedIssueUserProperty; addedProjectUserProperty (fields:user,filters,display_filters,display_properties,rich_filters,preferences,sort_order), updated related_name, db_table, ordering, constraints, and module exports.
Schema & data migrations
apps/api/plane/db/migrations/0113_alter_issueuserproperty_table.py,apps/api/plane/db/migrations/0114_alter_projectuserproperty_options_and_more.py
0113: rename/table/model migration toproject_user_properties, addpreferences andsort_order, update FK/constraints, and addAPIToken.allowed_rate_limit. 0114: data migration copying preferences/sort_order from ProjectMember to ProjectUserProperty and detaching workspace for non-service API tokens.
API views & endpoints
apps/api/plane/api/views/project.py,apps/api/plane/app/views/project/*,apps/api/plane/app/views/issue/base.py,apps/api/plane/app/views/__init__.py
ReplacedIssueUserPropertyProjectUserProperty across project creation, member management, invitations, and display-property endpoints; renamedIssueUserDisplayPropertyEndpointProjectUserDisplayPropertyEndpoint.
Serializers & URLs
apps/api/plane/app/serializers/issue.py,apps/api/plane/app/serializers/__init__.py,apps/api/plane/app/urls/issue.py
RenamedIssueUserPropertySerializerProjectUserPropertySerializer, updated Meta.model and exports; URL patterns and exports updated toProjectUserDisplayPropertyEndpoint.
Background tasks & management commands
apps/api/plane/bgtasks/workspace_seed_task.py,apps/api/plane/db/management/commands/create_project_member.py
Replaced imports/usages ofIssueUserProperty withProjectUserProperty in create / bulk_create / get_or_create flows.
API model addition
apps/api/plane/db/models/api.py
AddedAPIToken.allowed_rate_limit CharField (max_length=255, default"60/min").
Tests
apps/api/plane/tests/contract/app/test_project_app.py
Updated imports and assertions to referenceProjectUserProperty instead ofIssueUserProperty.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Files/areas needing extra attention:
    • apps/api/plane/db/migrations/0113_alter_issueuserproperty_table.py — verify table rename, constraints, and JSON defaults align with model code.
    • apps/api/plane/db/migrations/0114_alter_projectuserproperty_options_and_more.py — review mapping logic, bulk_update batching, and data integrity for missing/duplicated members.
    • apps/api/plane/db/models/project.py — confirm JSONField default functions and Meta configuration match migration expectations.
    • Cross-module references — search for any remainingIssueUserProperty usages in views, serializers, tasks, CLI, or tests.

Poem

🐇 I hopped through code with whiskers bright,
I nudged Issue into Project overnight.
Preferences packed, migrations in tow,
Tokens trimmed to limits — steady they flow.
A rabbit cheers this tidy byte of light!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 31.25% which is insufficient. The required threshold is 80.00%.You can run@coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check nameStatusExplanation
Title check✅ PassedThe PR title clearly and concisely describes the main refactoring: renaming IssueUserProperty to ProjectUserProperty and updating all related references throughout the codebase.
Description check✅ PassedThe PR description covers the main changes with a brief summary, identifies the type of change correctly, mentions test scenarios, and includes the related ticket reference. The template structure is mostly followed.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branchchore-user-property-migrations

Thanks for usingCodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment@coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitaicoderabbitaibot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
apps/api/plane/db/models/api.py (1)

35-39:Newallowed_rate_limit field is consistent with migration; consider minor cleanups

Theallowed_rate_limit CharField with default"60/min" looks fine and matches the migration; this should be safe for existing tokens. You may also want to (optionally) addhelp_text clarifying the expected format and fix the existing typo"API Tokems" inverbose_name_plural while you’re in this model.

apps/api/plane/db/migrations/0113_alter_issueuserproperty_table.py (1)

1-38:Migration sequence and new fields look consistent with the model changes

The migration cleanly renames theIssueUserProperty table/model toProjectUserProperty and adds theallowed_rate_limit,preferences, andsort_order fields in line with the model definitions. If you want extra long‑term safety, you could inline a simple dict default forpreferences in this migration instead of importingget_default_preferences, but it’s not strictly required.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between8db95d9 and6a09e51.

📒 Files selected for processing (16)
  • apps/api/plane/api/views/project.py (3 hunks)
  • apps/api/plane/app/serializers/issue.py (2 hunks)
  • apps/api/plane/app/urls/issue.py (1 hunks)
  • apps/api/plane/app/views/issue/base.py (3 hunks)
  • apps/api/plane/app/views/project/base.py (3 hunks)
  • apps/api/plane/app/views/project/invite.py (2 hunks)
  • apps/api/plane/app/views/project/member.py (3 hunks)
  • apps/api/plane/bgtasks/workspace_seed_task.py (2 hunks)
  • apps/api/plane/db/management/commands/create_project_member.py (2 hunks)
  • apps/api/plane/db/migrations/0113_alter_issueuserproperty_table.py (1 hunks)
  • apps/api/plane/db/migrations/0114_auto_20251201_0857.py (1 hunks)
  • apps/api/plane/db/models/__init__.py (1 hunks)
  • apps/api/plane/db/models/api.py (1 hunks)
  • apps/api/plane/db/models/issue.py (0 hunks)
  • apps/api/plane/db/models/project.py (1 hunks)
  • apps/api/plane/tests/contract/app/test_project_app.py (3 hunks)
💤 Files with no reviewable changes (1)
  • apps/api/plane/db/models/issue.py
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-07-23T18:18:06.875Z
Learnt from: NarayanBavisettiRepo: makeplane/plane PR: 7460File: apps/api/plane/app/serializers/draft.py:112-122Timestamp: 2025-07-23T18:18:06.875ZLearning: In the Plane codebase serializers, workspace_id is not consistently passed in serializer context, so parent issue validation in DraftIssueCreateSerializer only checks project_id rather than both workspace_id and project_id. The existing project member authentication system already validates that users can only access projects they belong to, providing sufficient security without risking breaking functionality by adding workspace_id validation where the context might not be available.

Applied to files:

  • apps/api/plane/app/views/project/member.py
  • apps/api/plane/app/serializers/issue.py
  • apps/api/plane/api/views/project.py
  • apps/api/plane/tests/contract/app/test_project_app.py
  • apps/api/plane/bgtasks/workspace_seed_task.py
📚 Learning: 2025-10-29T09:17:54.815Z
Learnt from: NarayanBavisettiRepo: makeplane/plane PR: 7905File: apps/api/plane/app/views/search/base.py:241-276Timestamp: 2025-10-29T09:17:54.815ZLearning: In apps/api/plane/app/views/search/base.py, the `filter_intakes` method uses `Issue.objects` (base manager) instead of `Issue.issue_objects` (custom manager) because the custom manager filters out all intake statuses, which would prevent querying pending and snoozed intake issues.

Applied to files:

  • apps/api/plane/api/views/project.py
  • apps/api/plane/app/views/issue/base.py
📚 Learning: 2025-09-12T07:29:36.083Z
Learnt from: dheeru0198Repo: makeplane/plane PR: 7625File: apps/api/plane/bgtasks/workspace_seed_task.py:95-98Timestamp: 2025-09-12T07:29:36.083ZLearning: In the Plane codebase, workspace seed data should have project features (cycle_view, module_view, issue_views_view) enabled by default, even when regular project creation has these features disabled. This provides users with a complete demo experience in the seeded workspace.

Applied to files:

  • apps/api/plane/bgtasks/workspace_seed_task.py
🧬 Code graph analysis (14)
apps/api/plane/app/views/project/member.py (1)
apps/api/plane/db/models/project.py (2)
  • Project (64-158)
  • ProjectUserProperty (317-348)
apps/api/plane/app/serializers/issue.py (1)
apps/api/plane/db/models/project.py (1)
  • ProjectUserProperty (317-348)
apps/api/plane/db/models/__init__.py (1)
apps/api/plane/db/models/project.py (1)
  • ProjectUserProperty (317-348)
apps/api/plane/db/management/commands/create_project_member.py (1)
apps/api/plane/db/models/project.py (1)
  • ProjectUserProperty (317-348)
apps/api/plane/app/urls/issue.py (1)
apps/api/plane/app/views/issue/base.py (1)
  • IssueUserDisplayPropertyEndpoint (718-735)
apps/api/plane/api/views/project.py (2)
apps/api/plane/db/models/project.py (1)
  • ProjectUserProperty (317-348)
apps/api/plane/app/views/project/base.py (3)
  • create (238-299)
  • create (501-508)
  • create (578-606)
apps/api/plane/db/migrations/0114_auto_20251201_0857.py (2)
apps/api/plane/db/models/project.py (2)
  • ProjectMember (191-235)
  • ProjectUserProperty (317-348)
apps/api/plane/db/migrations/0113_alter_issueuserproperty_table.py (1)
  • Migration (8-38)
apps/api/plane/app/views/issue/base.py (1)
apps/api/plane/db/models/project.py (1)
  • ProjectUserProperty (317-348)
apps/api/plane/tests/contract/app/test_project_app.py (1)
apps/api/plane/db/models/project.py (1)
  • ProjectUserProperty (317-348)
apps/api/plane/bgtasks/workspace_seed_task.py (1)
apps/api/plane/db/models/project.py (1)
  • ProjectUserProperty (317-348)
apps/api/plane/db/models/project.py (1)
apps/api/plane/db/models/issue.py (3)
  • get_default_filters (43-54)
  • get_default_display_filters (57-66)
  • get_default_display_properties (69-84)
apps/api/plane/app/views/project/base.py (2)
apps/api/plane/db/models/project.py (1)
  • ProjectUserProperty (317-348)
apps/api/plane/app/views/project/member.py (1)
  • create (42-150)
apps/api/plane/app/views/project/invite.py (1)
apps/api/plane/db/models/project.py (1)
  • ProjectUserProperty (317-348)
apps/api/plane/db/migrations/0113_alter_issueuserproperty_table.py (2)
apps/api/plane/db/migrations/0114_auto_20251201_0857.py (1)
  • Migration (31-42)
apps/api/plane/db/models/project.py (1)
  • get_default_preferences (60-61)
⏰ 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). (4)
  • GitHub Check: Agent
  • GitHub Check: Cursor Bugbot
  • GitHub Check: Lint API
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (22)
apps/api/plane/app/urls/issue.py (1)

211-217:Comment rename correctly reflects underlying model

The updated## ProjectUserProperty comments around theuser-properties/ route align with the new model name and keep the URL behavior unchanged.

apps/api/plane/db/models/__init__.py (1)

48-56:Public model surface correctly switched toProjectUserProperty

ExportingProjectUserProperty from.project (withIssueUserProperty no longer present) correctly aligns the public API with the new model.

apps/api/plane/app/serializers/issue.py (2)

16-41:Model import updated correctly toProjectUserProperty

Switching the import inplane.db.models from the old property model toProjectUserProperty keeps this serializer file aligned with the new model layout.


349-353:IssueUserPropertySerializer now bound toProjectUserProperty

Pointing the serializer’sMeta.model toProjectUserProperty matches the refactor and stays compatible with existing views that use this serializer. Theread_only_fields list still matches the new model’s base fields, so no further changes seem necessary.

apps/api/plane/app/views/project/base.py (1)

24-37:Project creation flow now correctly seedsProjectUserProperty

Importing and creatingProjectUserProperty for the creator (and distinct project lead) keeps per-user project properties in sync with the new model and respects the unique (user, project) constraint. The conditional onproject_lead still prevents duplicate records for the same user.

Also applies to: 245-266

apps/api/plane/db/management/commands/create_project_member.py (1)

6-12:Management command now seedsProjectUserProperty instead ofIssueUserProperty

Updating the import and usingProjectUserProperty.objects.get_or_create(user=user, project=project) keeps this command aligned with the new model while preserving idempotent behavior.

Also applies to: 69-71

apps/api/plane/tests/contract/app/test_project_app.py (1)

6-13:Tests correctly updated to assertProjectUserProperty creation

Switching the import and expectations fromIssueUserProperty toProjectUserProperty matches the refactor: you now assert a property for the creator and two properties when a distinct project lead is set, which aligns with the updated create flow.

Also applies to: 80-87, 116-121

apps/api/plane/bgtasks/workspace_seed_task.py (2)

23-23:LGTM!

The import correctly references the renamedProjectUserProperty model.


121-160:LGTM!

The bulk creation correctly usesProjectUserProperty instead ofIssueUserProperty. The new fieldspreferences andsort_order are not explicitly set, which is acceptable as they have sensible defaults defined in the model.

apps/api/plane/app/views/issue/base.py (3)

54-54:LGTM!

Import correctly updated toProjectUserProperty.


720-729:LGTM!

Thepatch method correctly usesProjectUserProperty.objects.get() and accesses fields that exist in the new model definition. Note that the serializer is still namedIssueUserPropertySerializer, which appears to be intentional as it's not part of this refactor's scope.


732-735:LGTM!

Theget method correctly usesProjectUserProperty.objects.get_or_create() with appropriate fields matching the model's unique constraints.

apps/api/plane/app/views/project/member.py (3)

16-16:LGTM!

Import statement correctly includesProjectUserProperty.


121-127:LGTM!

ProjectUserProperty instantiation correctly sets the required fields. The new fieldspreferences andsort_order will use their default values, consistent with the pattern used elsewhere in the codebase.


132-132:LGTM!

bulk_create correctly usesProjectUserProperty with appropriate parameters includingignore_conflicts=True to handle the unique constraint on user and project.

apps/api/plane/api/views/project.py (3)

21-21:LGTM!

Import correctly updated toProjectUserProperty.


220-220:LGTM!

ProjectUserProperty creation for the requesting user correctly setsproject_id anduser. The new fields will use their default values.


231-234:LGTM!

ProjectUserProperty creation for the project lead is correctly implemented with appropriate conditional logic. Usinguser_id as a keyword argument is valid.

apps/api/plane/db/migrations/0114_auto_20251201_0857.py (2)

5-28:LGTM!

The data migration correctly copiespreferences andsort_order fromProjectMember toProjectUserProperty for matching user-project pairs. The implementation is efficient using dictionary-based lookups and bulk updates with an appropriate batch size.


31-42:LGTM!

The migration structure is correct with appropriate dependency on the previous migration and a no-op reverse operation, which is standard for data migrations.

apps/api/plane/app/views/project/invite.py (2)

27-27:LGTM!

Import correctly updated toProjectUserProperty.


163-174:LGTM!

The bulk creation ofProjectUserProperty is correctly implemented with appropriate fields andignore_conflicts=True to handle the unique constraint on user and project.

@sriramveeraghanta
Copy link
Member

@pablohashescobar Update theProjectUserProperty Serializers to support updating the additional properties.

Copy link
Contributor

CopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull request overview

This PR refactors theIssueUserProperty model toProjectUserProperty, reflecting its broader scope beyond issue-specific properties. The refactoring includes addingpreferences andsort_order fields migrated fromProjectMember, and also addsallowed_rate_limit to theAPIToken model.

Key changes:

  • RenamedIssueUserProperty toProjectUserProperty and moved fromissue.py toproject.py
  • Addedpreferences andsort_order fields toProjectUserProperty, populated via data migration fromProjectMember
  • Updated all references across views, serializers, tests, management commands, and background tasks

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
apps/api/plane/db/models/issue.pyRemovedIssueUserProperty model definition
apps/api/plane/db/models/project.pyAddedProjectUserProperty model with additional fields
apps/api/plane/db/models/init.pyUpdated import fromIssueUserProperty toProjectUserProperty
apps/api/plane/db/models/api.pyAddedallowed_rate_limit field toAPIToken
apps/api/plane/db/migrations/0113_alter_issueuserproperty_table.pyMigration to rename model, alter table, and add new fields
apps/api/plane/db/migrations/0114_alter_projectuserproperty_options_and_more.pyData migration fromProjectMember toProjectUserProperty
apps/api/plane/app/serializers/issue.pyUpdatedIssueUserPropertySerializer to useProjectUserProperty model
apps/api/plane/app/views/issue/base.pyUpdated references to useProjectUserProperty
apps/api/plane/app/views/project/base.pyUpdated project creation to useProjectUserProperty
apps/api/plane/app/views/project/member.pyUpdated member addition to useProjectUserProperty
apps/api/plane/app/views/project/invite.pyUpdated invite acceptance to useProjectUserProperty
apps/api/plane/api/views/project.pyUpdated API project creation to useProjectUserProperty
apps/api/plane/bgtasks/workspace_seed_task.pyUpdated seed task to useProjectUserProperty
apps/api/plane/db/management/commands/create_project_member.pyUpdated management command to useProjectUserProperty
apps/api/plane/app/urls/issue.pyUpdated comments to reflect rename
apps/api/plane/tests/contract/app/test_project_app.pyUpdated tests to assertProjectUserProperty creation

💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.

Copy link
Contributor

@coderabbitaicoderabbitaibot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between6a09e51 ande43d9b6.

📒 Files selected for processing (3)
  • apps/api/plane/db/migrations/0113_alter_issueuserproperty_table.py (1 hunks)
  • apps/api/plane/db/migrations/0114_alter_projectuserproperty_options_and_more.py (1 hunks)
  • apps/api/plane/db/models/project.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/api/plane/db/models/project.py
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: NarayanBavisettiRepo: makeplane/plane PR: 7460File: apps/api/plane/app/serializers/draft.py:112-122Timestamp: 2025-07-23T18:18:06.875ZLearning: In the Plane codebase serializers, workspace_id is not consistently passed in serializer context, so parent issue validation in DraftIssueCreateSerializer only checks project_id rather than both workspace_id and project_id. The existing project member authentication system already validates that users can only access projects they belong to, providing sufficient security without risking breaking functionality by adding workspace_id validation where the context might not be available.
🧬 Code graph analysis (2)
apps/api/plane/db/migrations/0114_alter_projectuserproperty_options_and_more.py (2)
apps/api/plane/db/models/project.py (2)
  • ProjectMember (191-235)
  • ProjectUserProperty (317-348)
apps/api/plane/db/migrations/0113_alter_issueuserproperty_table.py (1)
  • Migration (8-54)
apps/api/plane/db/migrations/0113_alter_issueuserproperty_table.py (2)
apps/api/plane/db/migrations/0114_alter_projectuserproperty_options_and_more.py (1)
  • Migration (31-39)
apps/api/plane/db/models/project.py (1)
  • get_default_preferences (60-61)
⏰ 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). (3)
  • GitHub Check: CodeQL analysis (python)
  • GitHub Check: Agent
  • GitHub Check: Cursor Bugbot

Copy link

@cursorcursorbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on December 20

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit theCursor dashboard to activate Pro and start your 14-day free trial.

…ertyEndpoint to ProjectUserPropertySerializer and ProjectUserDisplayPropertyEndpoint, updating all related references
Copy link
Contributor

@coderabbitaicoderabbitaibot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and betweenf75d40f andd874227.

📒 Files selected for processing (5)
  • apps/api/plane/app/serializers/__init__.py (1 hunks)
  • apps/api/plane/app/serializers/issue.py (2 hunks)
  • apps/api/plane/app/urls/issue.py (2 hunks)
  • apps/api/plane/app/views/__init__.py (1 hunks)
  • apps/api/plane/app/views/issue/base.py (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/api/plane/app/serializers/issue.py
  • apps/api/plane/app/views/issue/base.py
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-07-23T18:18:06.875Z
Learnt from: NarayanBavisettiRepo: makeplane/plane PR: 7460File: apps/api/plane/app/serializers/draft.py:112-122Timestamp: 2025-07-23T18:18:06.875ZLearning: In the Plane codebase serializers, workspace_id is not consistently passed in serializer context, so parent issue validation in DraftIssueCreateSerializer only checks project_id rather than both workspace_id and project_id. The existing project member authentication system already validates that users can only access projects they belong to, providing sufficient security without risking breaking functionality by adding workspace_id validation where the context might not be available.

Applied to files:

  • apps/api/plane/app/serializers/__init__.py
🧬 Code graph analysis (3)
apps/api/plane/app/serializers/__init__.py (1)
apps/api/plane/app/serializers/issue.py (1)
  • ProjectUserPropertySerializer (349-353)
apps/api/plane/app/views/__init__.py (1)
apps/api/plane/app/views/issue/base.py (1)
  • ProjectUserDisplayPropertyEndpoint (718-735)
apps/api/plane/app/urls/issue.py (1)
apps/api/plane/app/views/issue/base.py (1)
  • ProjectUserDisplayPropertyEndpoint (718-735)
⏰ 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). (2)
  • GitHub Check: Analyze (javascript)
  • GitHub Check: Cursor Bugbot
🔇 Additional comments (2)
apps/api/plane/app/serializers/__init__.py (1)

55-55:LGTM!

The serializer rename correctly reflects the model rename fromIssueUserProperty toProjectUserProperty.

apps/api/plane/app/views/__init__.py (1)

118-118:LGTM!

The public export correctly reflects the endpoint rename fromIssueUserDisplayPropertyEndpoint toProjectUserDisplayPropertyEndpoint, maintaining consistency with the model rename.

…perties by creating new entries and improve response handling
Copy link
Contributor

@coderabbitaicoderabbitaibot left a 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/app/views/issue/base.py (1)

718-745:Endpoint now supports updating new fields; consider minor cleanups

The renamedProjectUserDisplayPropertyEndpoint now usesProjectUserPropertySerializer withpartial=True, sopreferences andsort_order (and other writable fields) can be updated via PATCH, which addresses the earlier review concern. You could optionally:

  • Replace the explicit try/except +create inpatch with a singleget_or_create call (to mirrorget and reduce duplication).
  • Renameissue_property toproject_user_property oruser_property for clarity post‑refactor.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and betweend874227 and280c3ce.

📒 Files selected for processing (1)
  • apps/api/plane/app/views/issue/base.py (3 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-07-23T18:18:06.875Z
Learnt from: NarayanBavisettiRepo: makeplane/plane PR: 7460File: apps/api/plane/app/serializers/draft.py:112-122Timestamp: 2025-07-23T18:18:06.875ZLearning: In the Plane codebase serializers, workspace_id is not consistently passed in serializer context, so parent issue validation in DraftIssueCreateSerializer only checks project_id rather than both workspace_id and project_id. The existing project member authentication system already validates that users can only access projects they belong to, providing sufficient security without risking breaking functionality by adding workspace_id validation where the context might not be available.

Applied to files:

  • apps/api/plane/app/views/issue/base.py
🧬 Code graph analysis (1)
apps/api/plane/app/views/issue/base.py (2)
apps/api/plane/app/serializers/issue.py (3)
  • ProjectUserPropertySerializer (349-353)
  • create (194-269)
  • create (580-583)
apps/api/plane/db/models/project.py (1)
  • ProjectUserProperty (317-348)
⏰ 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). (2)
  • GitHub Check: Cursor Bugbot
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
apps/api/plane/app/views/issue/base.py (1)

37-38:Imports correctly updated to ProjectUserProperty model/serializer

The imports forProjectUserPropertySerializer andProjectUserProperty are consistent with the refactor and are used appropriately in this module; no issues from this change set.

Also applies to: 54-59

Copy link
Contributor

@coderabbitaicoderabbitaibot left a 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

♻️ Duplicate comments (1)
apps/api/plane/db/migrations/0114_alter_projectuserproperty_options_and_more.py (1)

20-25:Add None checks before copying ProjectMember fields.

The concern raised in previous review remains unresolved: older ProjectMember records may haveNone forpreferences andsort_order (migration 0110 did not backfill), which would overwrite the defaults already set in migration 0113. Add conditional checks to preserve existing defaults when source fields are None.

🧹 Nitpick comments (1)
apps/api/plane/db/migrations/0114_alter_projectuserproperty_options_and_more.py (1)

31-39:Cursor bot comment is a false positive; the migration logic is correct.

The previous concern aboutuser__is_bot=False in anupdate() call is incorrect. Line 35 usesuser__is_bot=False in the.filter() clause (which supports related lookups), while line 36 only updatesworkspace_id (a direct field onAPIToken). This is valid Django ORM usage.

The migration correctly clears workspace associations for non-service, non-bot tokens as intended.

Minor formatting note: Line 37 has an unnecessary blank line, and line 39 has an unnecessary return statement, but these are purely stylistic.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between2f0ea09 andab9a6b4.

📒 Files selected for processing (1)
  • apps/api/plane/db/migrations/0114_alter_projectuserproperty_options_and_more.py (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
apps/api/plane/db/migrations/0114_alter_projectuserproperty_options_and_more.py (3)
apps/api/plane/db/models/project.py (1)
  • ProjectUserProperty (317-348)
apps/api/plane/db/models/api.py (1)
  • APIToken (19-44)
apps/api/plane/db/migrations/0113_alter_issueuserproperty_table.py (1)
  • Migration (8-55)
⏰ 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

@dheeru0198dheeru0198 added the 🔄migrationsContains Migration changes labelDec 10, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@coderabbitaicoderabbitai[bot]coderabbitai[bot] left review comments

Copilot code reviewCopilotCopilot left review comments

@cursorcursor[bot]cursor[bot] left review comments

@dheeru0198dheeru0198dheeru0198 approved these changes

@sriramveeraghantasriramveeraghantaAwaiting requested review from sriramveeraghanta

Requested changes must be addressed to merge this pull request.

Assignees

No one assigned

Labels

🔄migrationsContains Migration changes

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@pablohashescobar@sriramveeraghanta@dheeru0198

[8]ページ先頭

©2009-2025 Movatter.jp