I ran a few tests.
The command to “change the due date of a subtask” failed.
The system recognized whether a task had subtasks or not.
In other words, it seems that editing subtasks is not possible.
Due to Asana’s specifications, it is possible to perform actions on trigger tasks. However, since tasks and subtasks are separate tasks, it appears that actions cannot be performed on subtasks.
if (!parentDueDate) {
console.log(“Parent task does not have a due date”);
return;
}
/ Calculate the date N days later
const date = new Date(parentDueDate);
date.setDate(date.getDate() + N);
const newDueDate = date.toISOString().split(‘T’)[0]; // YYYY-MM-DD format
/ Get a list of subtasks
const subtasks = await client.tasks.subtasks(task_gid);
// Set a new due date for each subtask
for (const subtask of subtasks) {
await client.tasks.update(subtask.gid, {
due_on: newDueDate
});
console.log(Due date ${newDueDate} set for subtask ${subtask.name});
}
When I consulted Copilot, they said that I could use AI-Studio and script actions together.
The AI would make the conditional decisions, the script would execute them, and the AI would write the comments.
Based on our experience at i.DO, script ares an alternative to AI Studio in use-cases where AI is not completely relevant (relatively simple workflows, no need to analyze data, etc…)
I’ve never tested both combined, I’m not sure how that would work. But curious to have your return on experience
I ran into the same issue with subtasks, which was frustrating when approvals are generally created as subtasks, but you cannot use their approval to move the main task to a new section.
We’re upgrading to Ent, and I’m looking forward to the additional functionality. I haven’t tried scripts yet, but I certainly intend to.