Skip to content

Commit a105871

Browse files
feat: update work item property linking to support bulk property assignment (#45)
1 parent 2c0aa28 commit a105871

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

plane/api/workspace_work_item_types/properties.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,17 @@ def list(self, workspace_slug: str, type_id: str) -> list[str]:
2929

3030
def create(
3131
self, workspace_slug: str, type_id: str, data: WorkspaceWorkItemTypePropertyLink
32-
) -> WorkItemProperty:
33-
"""Link a property to a workspace work item type.
34-
32+
) -> None:
33+
"""Link one or more properties to a workspace work item type.
3534
Args:
3635
workspace_slug: The workspace slug identifier
3736
type_id: UUID of the work item type
38-
data: DTO containing the property_id to link
37+
data: DTO containing properties (list of UUIDs) to link
3938
"""
40-
response = self._post(
39+
self._post(
4140
f"{workspace_slug}/work-item-types/{type_id}/properties/",
4241
data.model_dump(exclude_none=True),
4342
)
44-
return WorkItemProperty.model_validate(response)
4543

4644
def delete(self, workspace_slug: str, type_id: str, property_id: str) -> None:
4745
"""Unlink a property from a workspace work item type.

plane/models/work_item_types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ class UpdateWorkItemType(BaseModel):
5858

5959

6060
class WorkspaceWorkItemTypePropertyLink(BaseModel):
61-
"""Request model for linking a property to a workspace work item type."""
61+
"""Request model for linking properties to a workspace work item type."""
6262

6363
model_config = ConfigDict(extra="ignore", populate_by_name=True)
6464

65-
property_id: str
65+
properties: list[str]

0 commit comments

Comments
 (0)