makeplane / makeplane/plane

[bug]: Soft-deleted States still visible after page refresh

Open
#8,590 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
59.6k
Forks
5.8k
Avg merge
1d 22h
Merged PRs (30d)
49

Description

Description

When deleting a State in Project Settings → States, the state disappears immediately from the UI. However, after refreshing the page (F5), the deleted state reappears and is visible again.

Environment

  • Plane Version: v1.2.1 (stable)
  • Deployment Method: Docker Compose (Self-hosted)
  • Image Source: artifacts.plane.so/makeplane
  • OS: Linux (Ubuntu/Debian)
  • Browser: Chrome 144.0.0.0

Steps to Reproduce

  1. Create a new project or use an existing project
  2. Go to Project SettingsStates
  3. Create a new state (e.g., "Test State")
  4. Click the delete button (trash icon) on the newly created state
  5. Observe: The state disappears from the list ✓
  6. Refresh the page (F5)
  7. Observe: The deleted state reappears in the list ✗

Expected Behavior

After deleting a state and refreshing the page, the deleted state should remain deleted and not be visible.

Actual Behavior

The deleted state reappears after page refresh, even though:

  • The DELETE API call returns HTTP 204 (success)
  • The deleted_at timestamp is correctly set in the database

Root Cause Analysis

I investigated the database and found that Plane uses soft delete (sets deleted_at timestamp instead of removing the record):

SELECT id, name, deleted_at FROM states WHERE project_id = '<PROJECT_ID>';

Result:

name deleted_at
Backlog NULL
Todo NULL
Test State 2026-01-27 08:34:00+00

The API GET endpoint /api/workspaces/{workspace}/projects/{project}/states/ appears to not filter out records where deleted_at IS NOT NULL, causing soft-deleted states to be returned and displayed.

API Logs Evidence

# Delete request - returns 204 (success)
DELETE /api/workspaces/.../states/a8b281e4-.../ 204

# Subsequent GET request still returns the deleted state
GET /api/workspaces/.../states/ 200

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the GET endpoint /api/workspaces/{workspace}/projects/{project}/states/ and inspect how its returned states are selected. Reproduce the delete and refresh sequence, then verify that the response and UI no longer include records with a non-null deleted_at value.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, postgresql, python
Domain
api, backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.