-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Open
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
- Create a new project or use an existing project
- Go to Project Settings → States
- Create a new state (e.g., "Test State")
- Click the delete button (trash icon) on the newly created state
- Observe: The state disappears from the list ✓
- Refresh the page (F5)
- 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_attimestamp 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels