Understanding subtask inheritance in search endpoint

Hi all,

We are actually moving our application from using “regular” endpoint, to use the “search” endpoint instead, that is more flexible.

We do some tests, and we found strange behaviors.

In some cases, the search endpoint seems to apply “inheritance” on subtasks. But not in all cases.

I have these tasks:

  • 1206482251193707 (memberships:1206482251193697)
  • 1206482251193709 (memberships:1206482251193697)
    • 1207517374246587 (completed) (parent:1206482251193709)
      • 1207517374246590 (parent:1207517374246587)
      • 1207517374246589 (parent:1207517374246587)
      • 1207789046986831 (parent:1207517374246587) (memberships:1206482251193697)
    • 1207517374246588 (parent:1206482251193709)
  • 1206482251193711 (memberships:1206482251193697)

If I use the /projects/1206482251193697/tasks endpoint, I get “1207789046986831” in return, because that task is specifically set to project, using membership.
And, I only get 4 tasks in return, those who have specific project in membership, being a subtask or not.

And, if I set “is_subtask=false”, I get only the 3 “root” tasks, I don’t get “1207789046986831”. That makes sense because, it’s a subtask, even if it’s also set to the project membership.
But, I would like to get it in return, without the other subtasks, because this one is set directly to the project membership. There’s no way to do that in the search endpoint.

On the “search” endpoint, if I query for project.any=1206482251193697, I get all these 8 tasks in return.
So, an inheritance is applied for tasks without memberhip.

Inheritance is strong with projects.any :slight_smile:
I also did that test: set one subtask to be member of ANOTHER project.
And, that task is returned in the resultset when querying for projets.any.

  • query: projects.any=1206482251193697
  • response: card with membership .project.gid = 1207789046986833

Because, one parent in the hierarchy of that subtask is member of 1206482251193697 !!!

Then, I tried to do the same with assignee.
I have a “root” task assigned to a user.
And, I create subtasks , some assigned to that user, and others not.

From the url /users/[assignee]/tasks, I get tasks that are directly assigned to that user.
From the …/search endpoint, I get the same results, by using “assignee.any” parameter.

So, it’s a little bit hard to understand which results I get when I query tasks with subtasks.

Finally, I try to understand how that inheritance VS no inheritance works, with subtasks, in the “search” endpoint, but it’s hard because the expected results are not always the same.

I think that another parameter should be present, something like “subtask_inheritance” = true/false.

One two testing? I lost access to my account!! I used “login with google”, with the same email, and now I am another user !!! What ?

That might be related to the recent split that happened. Our accounts are not merged anymore, they are split. I had the same issue here a few days ago. You need to login, or create an account, with your company email, and I believe it will find it again…