Rescheduling Subtasks using AI Studio - possible?

Our digital team has a scheduling project that utilizes a rule to create assigned subtasks with due dates relative to the parent task’s due date. The challenge is that the parent tasks are often rescheduled and the relative due dates on the subtasks are then out-of-sync.

The rule inadvertently recreates these same subtasks with new due dates when the parent task is rescheduled. This creates a cluttered mess of duplicates in my teammates My Tasks, and anywhere these subtasks are multi-homed.

I wanted to create a custom rule that deletes subtasks when the task’s due date is removed. Those options don’t exist. I pivoted to if AI Studio could instead help me reschedule the subtasks with the following guidance (specific names removed to protect the innocent :sweat_smile:):

You are managing the scheduling of subtasks in the {XYZ } project. When a task’s due date changes in the {123} section, you need to reschedule the subtasks based on who they’re assigned to.

For each subtask in the task: 1. If assigned to {@Teammate 1], set the due date to 3 days before the main task’s due date 2. If assigned to {@Teammate 2}, set the due date to 2 days before the main task’s due date 3. If assigned to {@Teammate 3}, set the due date to the same day as the main task’s due date

Add a comment explaining that the subtasks have been rescheduled to align with the new task due date. Include the new due dates for each subtask in your comment.

If the task doesn’t have subtasks, don’t take any action.

The generated result was When Due Date is Changed > Check if Assignee is not empty and Due date is Not Empty > Do this Add Comment in task (use AI) and Create subtasks (create with AI)

This results in the subtasks being duplicated and a comment added.

I don’t know where to go from here. I’ve tried to iterate on the rule multiple times, only to end in frustration. Any insight or help troubleshooting is appreciated!

1 Like

@Kate_Miller,

Did you try making the parent and subtasks part of a dependency chain and using Asana’s provided dependency management settings and behavior to see if that might solve your issue?

I think it’s good to start there, if you haven’t already.

I’m not really sure if AI Studio could help you if the above doesn’t, but I bet someone else will chime in!

Thanks,

Larry

2 Likes

Hi @lpb ,

I haven’t worked much with dependencies, so I’ll read up on that and give it a go. Thanks for the suggestion!

Kate

2 Likes

Update: Dependencies were helpful, but I’m still unable to prevent subtasks from being duplicated using Rules and dependencies in combo. I either have to use a task template with the subtasks pre-populated and assigned (cluttering My Tasks), or unassigned and take the chance that humans will remember to assign the subtasks when the task is scheduled with a due date - leaving me back at square one and why I wanted to originally automate this.

I’d love help with a rule or combination of rules that allows my team to:

  1. Create a task that advances through various development stages, and once it’s scheduled to air, a due date is manually input.
  2. When the task’s due date is input, assigned subtasks with relative due dates are generated.
  3. If the parent task is rescheduled, the subtasks due dates are auto-shifted to stay in sync with the new schedule.

It is KEY that new subtasks aren’t created when the parent task is rescheduled. I can’t seem to get over that hurdle. I’m challenged with creating rules that impact subtasks specifically.

Thanks in advance for any additional help or thoughts anyone shares! :sparkles:

Kate

1 Like

Sorry, @Kate_Miller.

Your good description here might result in someone offering other suggestions here. (I try to limit detailed workflow design help to interactive sessions because it’s hard for me in a forum context.)

One stopgap in case that doesn’t happen:

In some cases that are hard to fully automated, it can be easy to just create a task with assignee and due date with an instruction to carry out the needed work manually. I know that’s not really full automation, but in creates the follow-up to help ensure it happens and at least that part is automatic!

Thanks,

Larry

1 Like

Hi, @Kate_Miller .
It’s not easy to set up AI Studio smoothly.

About


I ran some tests.
The instruction to “change the subtask’s due date” was not executed.

  • The existence of subtasks was recognized.
  • The subtask’s due date could not be manipulated.

So, in other words, it seems that you can’t edit subtasks in AI-Studio. As per Asana specifications, you can take action on trigger tasks. However, since tasks and subtasks are separate tasks, you can’t take action on them.


Alternatively, can eventually achieve that using “Script action”


In my testing, I was able to extract the “difference in days between before and after the change” in a task’s due date by combining “existing rules” and “custom fields.”

As a result of the above, the “difference in days between before and after the change” is recorded in the custom field. (For example, a one-day difference was recorded as 1440.)

It seems possible to use a script to change the due date of a subtask based on the value of the main task’s “difference in days between before and after the change” custom field.


For example, Copiloto’s answer was something like this. (This script is not guaranteed to be correct.)

  1. Implementation Concept
    Get the old and new due dates of the parent task.
  • When the script is executed, context.task.due_on is the new due date.
  • The old due date can be saved in custom_fields or description for comparison.
  1. Calculate the difference in days.
    const oldDueDate = new Date(“2025-09-10”); // Example: Saved old due date
    const newDueDate = new Date(context.task.due_on);
    const diffDays = Math.round((newDueDate - oldDueDate) / (1000 * 60 * 60 * 24));

  2. Get the subtask due dates and add the difference.
    const subtasks = await tasksApiInstance.getSubtasksForTask(context.task.gid);
    for (const subtask of subtasks.data) {
    const detail = await tasksApiInstance.getTask(subtask.gid);
    const subDue = detail.data.due_on;
    if (subDue) {
    const newSubDue = new Date(subDue);
    newSubDue.setDate(newSubDue.getDate() + diffDays);
    await tasksApiInstance.updateTask(subtask.gid, {
    due_on: newSubDue.toISOString().split(“T”)[0]
    });
    }
    }

2 Likes

@Kate_Miller – Have you tried adding a Condition to the rule, so that it only runs if the Date field is empty. That way, it shouldn’t fire when a date is changed.

I agree with @lpb that Dependencies in subtasks is the way to go. It won’t reschedule them automatically. But when you manually change the 1st subtask, the dependent subtasks will shift (read up in this article: Asana Help Center ).

You would need to link the subtask dependences within the Rule:

Asana does not run rules on subtasks or parent tasks. I believe the Flowsana plug-in has that feature.

Hope that helps!

2 Likes

Thanks, All, for the suggested work arounds. The only solution that has worked is via Flowsana. The hiccup there is the cost. I’ve added a (hefty) monthly expense to solve a singular issue, and I don’t know how sustainable that is long-term.

Asana, please please PLEASE consider turning on more rules to manage subtasks!

1 Like

Not helpful for you today, but in the recent Ambassador meeting they did mention that Subtasks are getting expanded functionality to behave more like standard Tasks, meaning that we will be able to handle them just like Tasks (including limiting rules to only Subtasks). I am with you that these constraints around Subtasks are a neck ache!

1 Like