From 835b94a5b09d5cc306da2063d9cf3ee5b9483083 Mon Sep 17 00:00:00 2001 From: akhil-vamshi-konam Date: Mon, 1 Jun 2026 18:08:00 +0530 Subject: [PATCH] feat: update work item property linking to support bulk property assignment --- plane/api/workspace_work_item_types/properties.py | 10 ++++------ plane/models/work_item_types.py | 4 ++-- pyproject.toml | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/plane/api/workspace_work_item_types/properties.py b/plane/api/workspace_work_item_types/properties.py index cdd6a0d..0b22414 100644 --- a/plane/api/workspace_work_item_types/properties.py +++ b/plane/api/workspace_work_item_types/properties.py @@ -29,19 +29,17 @@ def list(self, workspace_slug: str, type_id: str) -> list[str]: def create( self, workspace_slug: str, type_id: str, data: WorkspaceWorkItemTypePropertyLink - ) -> WorkItemProperty: - """Link a property to a workspace work item type. - + ) -> None: + """Link one or more properties to a workspace work item type. Args: workspace_slug: The workspace slug identifier type_id: UUID of the work item type - data: DTO containing the property_id to link + data: DTO containing properties (list of UUIDs) to link """ - response = self._post( + self._post( f"{workspace_slug}/work-item-types/{type_id}/properties/", data.model_dump(exclude_none=True), ) - return WorkItemProperty.model_validate(response) def delete(self, workspace_slug: str, type_id: str, property_id: str) -> None: """Unlink a property from a workspace work item type. diff --git a/plane/models/work_item_types.py b/plane/models/work_item_types.py index affac9d..6351fc4 100644 --- a/plane/models/work_item_types.py +++ b/plane/models/work_item_types.py @@ -58,8 +58,8 @@ class UpdateWorkItemType(BaseModel): class WorkspaceWorkItemTypePropertyLink(BaseModel): - """Request model for linking a property to a workspace work item type.""" + """Request model for linking properties to a workspace work item type.""" model_config = ConfigDict(extra="ignore", populate_by_name=True) - property_id: str + properties: list[str] diff --git a/pyproject.toml b/pyproject.toml index d3f1c71..bed7970 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plane-sdk" -version = "0.2.13" +version = "0.2.14" description = "Python SDK for Plane API" readme = "README.md" requires-python = ">=3.10"