Closed
Description

How to reproduce:
- You need to have on your deployment failed and deleted workspaces
- Try to filter using "status:deleted"
- You will see workspaces with the "failed" badge
Response from the server:
{
"workspaces": [
{
"id": "b31302f5-d62b-4257-8826-8247fab736a3",
"created_at": "2023-05-15T19:40:54.11607Z",
"updated_at": "2023-05-15T19:40:54.11607Z",
"owner_id": "5ccd3128-cbbb-4cfb-8139-5a1edbb60c71",
"owner_name": "bpmct",
"organization_id": "703f72a1-76f6-4f89-9de6-8a3989693fe5",
"template_id": "5ae7e6f0-ca0d-403f-9fe2-3fa2063c4498",
"template_name": "devcontainer-on-docker",
"template_display_name": "",
"template_icon": "",
"template_allow_user_cancel_workspace_jobs": false,
"latest_build": {
"id": "65147d58-63ed-4a41-8281-13d2f73c968a",
"created_at": "2023-05-16T16:17:57.431116Z",
"updated_at": "2023-05-16T16:18:04.144033Z",
"workspace_id": "b31302f5-d62b-4257-8826-8247fab736a3",
"workspace_name": "coder-test",
"workspace_owner_id": "5ccd3128-cbbb-4cfb-8139-5a1edbb60c71",
"workspace_owner_name": "bpmct",
"template_version_id": "5a4d2091-1787-44fa-bd47-dea13ea14d08",
"template_version_name": "trusting_brahmagupta3",
"build_number": 3,
"transition": "delete",
"initiator_id": "5ccd3128-cbbb-4cfb-8139-5a1edbb60c71",
"initiator_name": "bpmct",
"job": {
"id": "6e61d8ef-1adf-492e-8a4e-7af2a7d8c8f0",
"created_at": "2023-05-16T16:17:57.423774Z",
"started_at": "2023-05-16T16:17:58.306652Z",
"completed_at": "2023-05-16T16:18:04.140848Z",
"error": "terraform apply: exit status 1",
"status": "failed",
"worker_id": "92805965-0d99-4824-9b99-cd86002c7f06",
"file_id": "2c902acb-eeaa-461a-9556-2d68a86b7c0e",
"tags": { "scope": "organization" }
},
"reason": "initiator",
"resources": [],
"deadline": null,
"max_deadline": null,
"status": "failed",
"daily_cost": 0
},
"outdated": true,
"name": "coder-test",
"ttl_ms": 86400000,
"last_used_at": "2023-05-16T14:05:54.475475Z",
"deleting_at": null
},
{
"id": "9113300e-0f8c-4879-aa89-dcdc312509bf",
"created_at": "2023-03-11T19:34:52.866948Z",
"updated_at": "2023-03-11T19:34:52.866948Z",
"owner_id": "0bac0dfd-b086-4b6d-b8ba-789e0eca7451",
"owner_name": "kylecarbs",
"organization_id": "703f72a1-76f6-4f89-9de6-8a3989693fe5",
"template_id": "0d286645-29aa-4eaf-9b52-cc5d2740c90b",
"template_name": "coder",
"template_display_name": "Write Coder on Coder",
"template_icon": "/emojis/1f3c5.png",
"template_allow_user_cancel_workspace_jobs": false,
"latest_build": {
"id": "88d5a8aa-d2b3-4b04-b67d-097a73beecff",
"created_at": "2023-03-21T19:12:31.595022Z",
"updated_at": "2023-03-21T19:12:31.595023Z",
"workspace_id": "9113300e-0f8c-4879-aa89-dcdc312509bf",
"workspace_name": "dev2",
"workspace_owner_id": "0bac0dfd-b086-4b6d-b8ba-789e0eca7451",
"workspace_owner_name": "kylecarbs",
"template_version_id": "37bd58b3-c817-4fc3-af3b-dd9c3b83653b",
"template_version_name": "stupefied_shannon1",
"build_number": 3,
"transition": "delete",
"initiator_id": "0bac0dfd-b086-4b6d-b8ba-789e0eca7451",
"initiator_name": "kylecarbs",
"job": {
"id": "a3801cca-070b-4e2a-9424-fabadae79ce6",
"created_at": "2023-03-21T19:12:31.594053Z",
"started_at": "2023-03-21T19:12:32.123527Z",
"completed_at": "2023-03-21T19:12:37.211205Z",
"error": "recv workspace provision: plan terraform: terraform plan: exit status 1",
"status": "failed",
"worker_id": "5989824e-a8a7-4354-b520-e6ba99b2a183",
"file_id": "7715ef60-7ad0-4da9-b9c0-ec339f7be71d",
"tags": { "scope": "organization" }
},
"reason": "initiator",
"resources": [],
"deadline": null,
"max_deadline": null,
"status": "failed",
"daily_cost": 0
},
"outdated": true,
"name": "dev2",
"last_used_at": "0001-01-01T00:00:00Z",
"deleting_at": null
}
],
"count": 2
}