Dragging and Dropping Sub Task into parent task causes strange UI + API returns task more than once

Hi, feel free to look at my test project here

Steps to reproduce:
Expand out task 2 No Section but with subtasks
drag and drop 2-11 asdf under section 16.2

Note, if you then do the same drag and drop a second time, it ‘fixes itself’
NOTE: the API returns the task twice when doing ‘get tasks’ from sections and get tasks from task… the API really thinks this task is in two places on the same project, something I thought wasn’t allowed, am I wrong?

Browser version:
Firefox 70.0.1

Upload screenshots below:

Hi @Adam_Dudley and thank you for reaching out and for sharing the screencast. It is very helpful to understand the issue.

This is actually not a Bug rather the expected behaviour. Let me give you some context here to explain you this behaviour.

As it stands, subtasks do not automatically inherit the project from their parent tasks. To do so, you will need to manually add the subtask to a project (you can learn more about it in the following Guide article. One of the ways to do it, is to drag and drop the subtask to any section of the Project (as you have done).

Once you do that, the subtask will appear in your project’s task list, Project Calendar and Project Timeline function like independent tasks with all the same fields as a parent task, with the difference that they are also embedded within a parent task. Reason why you are seen it in both nested in the Parent Task and under the Section where it belongs.

When viewing a subtask’s details, you can identify the parent task’s name above the subtask’s name and the project and section where is nested.

You can read more about subtasks in this handy article: https://asana.com/guide/help/tasks/subtasks

I’m sorry for the confusion and I hope this helps! But please, let me know if you have any follow-up question! I’ll be more than happy to help!

thanks for getting back to me, ok so i’ll need to take into account a task belonging to a project more than once.

Although this sounds very complicated, and I’m not sure what the use case of this feature is for ‘average’ users.

But thanks for confirming.

Hi Adam,

Just to be clear and precise (mostly since you mentioned the API so I figure you’re considering the underlying data model), from a data model perspective, the task does not belong to the project more than once. What you’re seeing in the Asana web app is strictly a UI-level manifestation. And in the API, while I’m not sure exactly which endpoints you’re querying, if you’re seeing the task in two different endpoint results, then it’s just that you’re asking for it in two different ways, so to speak. (We can definitely discuss the API ramifications further, if you want to specify the endpoints you’re using and where your confusion lies, but that’s probably best done in a separate thread in the “Developers & API” section.)

Mostly I’m just wanting to help you have the proper mental mapping of the data model, if that’s helpful!

Thanks for that Phil, appreciate the help.

Yes it would seem with the new sections, the only way to get all the tasks for a project is to go section by section.

I’m doing a depth first approach, so the same task appears twice; once as a sub task of some other task in section (no section) for example, and once as a sub task of another section further down the project.

It would seem with the new API, a ‘section’ is like the old ‘project’ for most things.

new bug - sync tokens
There is another bug relating to sync tokens and the API: when you drag and drop as shown above, ‘get all changes using sync token’ then drag and drop again, so that now the task really is just in one place, then ‘get all changes using sync token’, the API says there are no changes. I’ll attach an image.

FYI I’m moving this thread to the Developers & API section…

No - if you use this endpoint, you’ll get all of the tasks for the project (and you’ll see that each task is listed only once - the subtask you’re referring to will only be in the results once).

Maybe it’s just semantics but from your wording here I still feel like you’re missing the data-model concepts.

No, there is no such things as a “subtask of a section” - if it’s listed directly under a section, it’s a top-level task in the project, not a subtask. A subtask has a non-null parent property; a top-level task has a null parent property.

I use webhooks and haven’t used sync tokens so I can’t comment on this. Can @Ross_Grambo or anyone who’s used sync tokens weigh in on this?

1 Like

The explanation of the data model that I prefer is:

A task can be in multiple projects but only a single section within each project.
A task can be a subtask of another task. This task does not inherit any team, projects, or sections from the parent task.
These two types of task hierarchy do not relate with each other. A parent task can be in 10 different projects while its subtask is in a different 10 projects.

Lets review the steps of your drag and drop:

Before Dragging:
“2-11 asdf” task was a subtask of “2 No Section but with subtasks”
“2-11 asdf” has no project and/or accompanying section, as it does not inherit anything from it’s parent.

After Dragging:
“2-11 asdf” was added to the project under the “16 new section re” section.
“2-11 asdf” remains a subtask of “2 No Section but with subtasks”.

After Dragging again:
From what I see, the UI understands this drag to mean you no longer want it as a subtask anymore.
“2-11 asdf” is no longer a subtask of “2 No Section but with subtasks”
“2-11 asdf” remains in the project under the “16 new section re” section.

Sync Token

In regards to the sync token, it is acting correctly. On the second drag, no change happened at the project level, as the only change was breaking the parent subtask connection. Because subtasks don’t inherit anything from the project, they are not considered “in” the project.

One of the reasons my team loves this functionality is that we create public subtasks on private tasks that we need other people’s input on. Because our subtask does not inherit anything from the project, our subtask can be exposed/added to a public project while keeping the parent task private. We also add subtasks on a parent that are unrelated to the projects the parent is in. If the subtasks inherited the project, we would notify everyone watching the project, not just the task.

Hopefully this helps! :slight_smile: Let me know if my rambling didn’t make sense!


@Ross_Grambo, can you describe how you create this? I just tried to and the subtask, assigned to me when viewed in My Tasks says:

This task is visible to people who can see its parent task. Make public

So my test user can still see the subtask because they can see the parent task.

I’m sure I’m missing something.



Hey @lpb,

I misspoke in that message. A subtask can be public on a private parent, but not the other way around. I went ahead and updated my earlier post to be more accurate!

1 Like