fix: auto-assign tasks to PM agent when moved to in_progress, fix datetime serialization in WebSocket, add executor logging
This commit is contained in:
@@ -217,6 +217,17 @@ async def move_task(
|
||||
actor=user.username
|
||||
)
|
||||
|
||||
# Auto-assign to default agent (PM) if not already assigned
|
||||
if not current_task.get("assigned_to"):
|
||||
updates["assigned_to"] = "pm"
|
||||
updates["assigned_type"] = "agent"
|
||||
# Create agent execution record
|
||||
await opc_db.create_agent_execution(
|
||||
task_id=task_id,
|
||||
agent_id="pm",
|
||||
actor=user.username
|
||||
)
|
||||
|
||||
if old_status == "in_progress" and move.status != "in_progress":
|
||||
await opc_db.stop_time_entry(task_id=task_id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user