fix: keep tasks assigned to user - only move to Done section, never unassign

This commit is contained in:
Azreen Jamal
2026-03-06 17:33:36 +08:00
parent 0d7f54c239
commit fbeb79264a
+3 -5
View File
@@ -358,9 +358,7 @@ EVIDENCE: one line why`;
}
}
// Unassign to remove from My Tasks completely
await this.asana.updateTask(task.gid, { assignee: null });
logger.info("task-loop", `Cleared from My Tasks: ${task.name}`);
logger.info("task-loop", `Cleared completed task: ${task.name}`);
} catch (e: any) {
logger.debug("task-loop", `Could not clear task ${task.name}: ${e.message}`);
}
@@ -386,8 +384,8 @@ EVIDENCE: one line why`;
`✅ Pi Worker sweep: This task is **already completed**.\n\nEvidence:\n${check.evidence}`
);
await this.asana.updateTask(task.gid, { completed: true, assignee: null });
logger.info("task-loop", `My Tasks sweep: Marked done and unassigned: ${task.name}`);
await this.asana.updateTask(task.gid, { completed: true });
logger.info("task-loop", `My Tasks sweep: Marked done: ${task.name}`);
} else {
logger.debug("task-loop", `My Tasks sweep: "${task.name}" not yet done`);
}