Skip to content

Commit 5e9a79f

Browse files
committed
docs: Update KNOWN_ISSUES.md to document task group movement issue
- Added a new section detailing the issue with `taskOrderByGroups` not updating when a task's group is changed via the `edit_task` API. - Explained the root cause, impact on users, and proposed tasks for resolution. - Updated priority levels to reflect the critical nature of this issue. - Revised last updated date in the document.
1 parent 5558104 commit 5e9a79f

3 files changed

Lines changed: 55 additions & 3 deletions

File tree

KNOWN_ISSUES.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,46 @@ class CustomFieldType(str, Enum):
173173

174174
---
175175

176+
## Task Group Movement: taskOrderByGroups Not Updated
177+
178+
**Issue:** When changing a task's `group` field via `edit_task` API, the backend updates the task's `group` property but does not update the `taskOrderByGroups` dictionary on the board. This causes a discrepancy where:
179+
- The API returns the task with the new `group` value
180+
- The UI displays the task in the old group (based on `taskOrderByGroups`)
181+
- Task appears "orphaned" - has correct group in settings but wrong position on board
182+
183+
**Example:**
184+
```python
185+
# Task PRJ-2 moved from Backlog to Todo
186+
client.edit_task(EditTaskRequest(task_id="...", group=todo_group_id))
187+
188+
# After edit:
189+
task.group == todo_group_id # ✅ Correct
190+
board.task_order_by_groups[todo_group_id] # ❌ Task not in this list
191+
board.task_order_by_groups[backlog_group_id] # ❌ Task still in old list
192+
```
193+
194+
**Root Cause:** Backend's `editTask` endpoint does not automatically update the board's `taskOrderByGroups` field when task group changes.
195+
196+
**Impact:**
197+
- Users see tasks in wrong columns in UI
198+
- Task appears in one group in settings but another group on board
199+
- Breaks visual workflow - users lose track of task positions
200+
- SDK tests pass but UI shows incorrect state
201+
202+
**Task:**
203+
- [ ] **Backend Fix (Primary):** Update `editTask` endpoint to automatically:
204+
- Remove task ID from old group in `taskOrderByGroups`
205+
- Add task ID to new group in `taskOrderByGroups`
206+
- Or provide separate API endpoint to update task order
207+
- [ ] Document this limitation in SDK until backend is fixed
208+
- [ ] Add warning in SDK documentation about group movement
209+
- [ ] Consider adding workaround helper in SDK if backend fix is not feasible
210+
211+
**Workaround:**
212+
Currently no SDK-level workaround exists as there's no API endpoint to manually update `taskOrderByGroups`. Users must manually move tasks in UI after API edit, or wait for backend fix.
213+
214+
---
215+
176216
## General Recommendations
177217

178218
### Alignment Strategy
@@ -197,6 +237,9 @@ class CustomFieldType(str, Enum):
197237

198238
## Priority Levels
199239

240+
**Critical Priority:**
241+
- Task Group Movement taskOrderByGroups issue (breaks UI-API consistency, high user impact)
242+
200243
**High Priority:**
201244
- GetTasksRequest filtering options (impacts usability significantly)
202245
- CreateTaskRequest project requirement (causes confusion)
@@ -213,5 +256,5 @@ class CustomFieldType(str, Enum):
213256

214257
---
215258

216-
*Last Updated: 2025-10-20*
259+
*Last Updated: 2025-10-24*
217260

tests/test_file_blocks.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,16 @@ def test_add_images_with_captions_to_existing_document():
353353
"""Integration test: Add images with captions to existing document."""
354354
client = get_test_client()
355355

356-
# Use existing document ID
357-
document_id = "68fb4d1cd35675279afd63e1"
356+
# Create a new document for testing
357+
create_request = CreateDocumentRequest(
358+
kind=Kind.Space,
359+
kind_id=TEST_SPACE_ID,
360+
title="Test: Images with Captions",
361+
index=0
362+
)
363+
364+
doc_response = client.create_document(create_request)
365+
document_id = doc_response.payload.document.id
358366

359367
# Upload test image
360368
image_path = "assets/example.png"

vaiz/models/tasks.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ def model_dump(self, **kwargs):
142142
class EditTaskRequest(VaizBaseModel):
143143
task_id: str = Field(..., alias="taskId")
144144
name: Optional[str] = None
145+
group: Optional[str] = None
145146
parent_task: Optional[str] = Field(default=None, alias="parentTask")
146147
types: Optional[List[str]] = None
147148
priority: Optional[TaskPriority] = None

0 commit comments

Comments
 (0)