Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions plane/api/work_items/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def create(self, workspace_slug: str, project_id: str, data: CreateWorkItem) ->
data: Work item data
"""
response = self._post(
f"{workspace_slug}/projects/{project_id}/work-items",
f"{workspace_slug}/projects/{project_id}/issues",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

Plane API v1.0.0 official documentation issues endpoint

💡 Result:

Plane’s official API v1 docs are on the Plane Developers site (API Reference). The docs note that all /api/v1/.../issues/ endpoints are deprecated in favor of /api/v1/.../work-items/ (support ends March 31, 2026). [2]

Base URL (Plane Cloud): https://api.plane.so/ [1]

“Issues” (Work Items) endpoints (v1)

These are documented under Work Item (the pages’ URLs still contain /api-reference/issue/..., but the endpoint paths use work-items). [3]

  • Create: POST /api/v1/workspaces/{workspace_slug}/projects/{project_id}/work-items/ [3]
  • List: GET /api/v1/workspaces/{workspace_slug}/projects/{project_id}/work-items/ [4]
  • Get by ID: GET /api/v1/workspaces/{workspace_slug}/projects/{project_id}/work-items/{work_item_id}/ [5]
  • Update: PATCH /api/v1/workspaces/{workspace_slug}/projects/{project_id}/work-items/{work_item_id}/ [6]
  • Delete: DELETE /api/v1/workspaces/{workspace_slug}/projects/{project_id}/work-items/{work_item_id}/ [7]

🏁 Script executed:

cd /tmp && find . -name "base.py" -path "*/work_items/*" 2>/dev/null | head -5

Repository: makeplane/plane-python-sdk

Length of output: 52


🏁 Script executed:

find . -type f -name "base.py" | grep -i work 2>/dev/null

Repository: makeplane/plane-python-sdk

Length of output: 141


🏁 Script executed:

rg "workspace_slug.*projects.*issues" --type py -B 5 -A 5

Repository: makeplane/plane-python-sdk

Length of output: 11248


Replace deprecated /issues endpoints with /work-items paths.

The Plane API v1 documentation specifies that /api/v1/.../issues/ endpoints are deprecated in favor of /api/v1/.../work-items/ (deprecation support ends March 31, 2026). This file uses the deprecated /issues path across all methods—create(), retrieve(), update(), delete(), and list(). Update all endpoint paths from {workspace_slug}/projects/{project_id}/issues to {workspace_slug}/projects/{project_id}/work-items to align with current API standards.

🤖 Prompt for AI Agents
In `@plane/api/work_items/base.py` at line 42, All endpoints in base.py that build
the deprecated issues path need to be updated: replace any occurrences of the
string f"{workspace_slug}/projects/{project_id}/issues" (used by methods
create(), retrieve(), update(), delete(), and list()) with
f"{workspace_slug}/projects/{project_id}/work-items"; search for any other uses
of "issues" in URL builders within class methods in this file and update them to
"work-items" so all request paths (create, retrieve, update, delete, list)
conform to the v1 API.

data.model_dump(exclude_none=True),
)
return WorkItem.model_validate(response)
Expand Down Expand Up @@ -80,7 +80,7 @@ def retrieve(
"""
query_params = params.model_dump(exclude_none=True) if params else None
response = self._get(
f"{workspace_slug}/projects/{project_id}/work-items/{work_item_id}",
f"{workspace_slug}/projects/{project_id}/issues/{work_item_id}",
params=query_params,
)
return WorkItemDetail.model_validate(response)
Expand All @@ -102,7 +102,7 @@ def retrieve_by_identifier(
"""
query_params = params.model_dump(exclude_none=True) if params else None
response = self._get(
f"{workspace_slug}/work-items/{project_identifier}-{issue_identifier}",
f"{workspace_slug}/issues/{project_identifier}-{issue_identifier}",
params=query_params,
)
return WorkItemDetail.model_validate(response)
Expand All @@ -123,7 +123,7 @@ def update(
data: Updated work item data
"""
response = self._patch(
f"{workspace_slug}/projects/{project_id}/work-items/{work_item_id}",
f"{workspace_slug}/projects/{project_id}/issues/{work_item_id}",
data.model_dump(exclude_none=True),
)
return WorkItem.model_validate(response)
Expand All @@ -136,7 +136,7 @@ def delete(self, workspace_slug: str, project_id: str, work_item_id: str) -> Non
project_id: UUID of the project
work_item_id: UUID of the work item
"""
return self._delete(f"{workspace_slug}/projects/{project_id}/work-items/{work_item_id}")
return self._delete(f"{workspace_slug}/projects/{project_id}/issues/{work_item_id}")

def list(
self,
Expand Down Expand Up @@ -167,7 +167,7 @@ def list(
"""
query_params = params.model_dump(exclude_none=True) if params else None
response = self._get(
f"{workspace_slug}/projects/{project_id}/work-items", params=query_params
f"{workspace_slug}/projects/{project_id}/issues", params=query_params
)
return PaginatedWorkItemResponse.model_validate(response)

Expand All @@ -187,5 +187,5 @@ def search(
search_params = {"q": query}
if params:
search_params.update(params.model_dump(exclude_none=True))
response = self._get(f"{workspace_slug}/work-items/search", params=search_params)
response = self._get(f"{workspace_slug}/issues/search", params=search_params)
return WorkItemSearch.model_validate(response)