Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 4 additions & 6 deletions plane/api/workspace_work_item_types/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions plane/models/work_item_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]