Skip to content

[GIT-174]chore: set completed_at as read only field for work item#9083

Open
sangeethailango wants to merge 1 commit into
previewfrom
fix-issue-completed_at
Open

[GIT-174]chore: set completed_at as read only field for work item#9083
sangeethailango wants to merge 1 commit into
previewfrom
fix-issue-completed_at

Conversation

@sangeethailango
Copy link
Copy Markdown
Member

@sangeethailango sangeethailango commented May 15, 2026

This pull request updates the serializers for the Issue model to include the completed_at field as read-only. This ensures that the completed_at timestamp cannot be modified directly through API requests, improving data integrity and consistency.

Summary by CodeRabbit

  • Bug Fixes
    • Made the completion timestamp for issues read-only across all issue serializers, preventing manual modification through the API.

Review Change Stack

Copilot AI review requested due to automatic review settings May 15, 2026 11:17
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: af9fc300-f910-4580-9768-7dc7414baca9

📥 Commits

Reviewing files that changed from the base of the PR and between 50a7b47 and 9230f26.

📒 Files selected for processing (2)
  • apps/api/plane/api/serializers/issue.py
  • apps/api/plane/app/serializers/issue.py

📝 Walkthrough

Walkthrough

Three issue serializers (IssueSerializer, IssueExpandSerializer, and IssueCreateSerializer) across two files are updated to include completed_at in their Meta.read_only_fields lists, preventing client code from writing this timestamp field through API endpoints.

Changes

Protect completed_at field from client writes

Layer / File(s) Summary
Mark completed_at as read-only in issue serializers
apps/api/plane/api/serializers/issue.py, apps/api/plane/app/serializers/issue.py
IssueSerializer, IssueExpandSerializer, and IssueCreateSerializer each add completed_at to their Meta.read_only_fields, ensuring this timestamp cannot be set or modified through API serialization during retrieval, expansion, or creation operations.

🎯 1 (Trivial) | ⏱️ ~3 minutes

A timestamp once set, let none rewrite,
Completed at—a moment locked so tight,
Three serializers guard with read-only might,
The rabbit seals the field from careless blight! 🐰✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the main change and its purpose, but lacks the structured template sections (Type of Change, Test Scenarios, etc.) required by the repository. Fill in the required template sections including Type of Change (likely 'Code refactoring' or 'Improvement'), Test Scenarios, and any relevant References/issue links.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: marking completed_at as read-only in serializers, directly matching the changeset modifications across multiple serializer files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-issue-completed_at

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

❤️ Share

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

Copy link
Copy Markdown
Contributor

Copilot AI 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

Marks completed_at as read-only in Issue serializers so it cannot be set via API requests.

Changes:

  • Add completed_at to read_only_fields in app-level Issue serializer.
  • Add completed_at to read_only_fields in API-level IssueSerializer and another Meta block.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
apps/api/plane/app/serializers/issue.py Adds completed_at to read-only fields.
apps/api/plane/api/serializers/issue.py Adds completed_at to read-only fields in two Meta classes.

@makeplane
Copy link
Copy Markdown

makeplane Bot commented May 15, 2026

Linked to Plane Work Item(s)

This comment was auto-generated by Plane

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants