Hello, when I call `/tasks/{task_gid}` for subtask response doesn't have any project, but parent task has project. (also resource_type for this subtask is task). Can you describe how to understand what project it belongs to

Hello, when I call /tasks/{task_gid} for subtask response doesn’t have any project, but parent task has project. (also resource_type for this subtask is task). Can you describe how to understand what project it belongs to and why it is empty

Please read this before posting

  • If you received an error from the API that you’re looking for help with, please include the error in your post and be descriptive of the requests you made that received the errors. To be clear, we need the error in the JSON response from the API, not the error your code raised.
  • Do not share any API credentials. Please check that the code you’re pasting into the post does not contain any real OAuth tokens or personal access tokens. If you have exposed credentials, you should revoke them immediately.

This is intended, subtasks don’t technically belong to the project.

1 Like

There is no inheritance from task to subtask.
The only link between a task and a subtask, is the subtask have an attribute “parent” that is the id of the parent.
That’s all.
A subtask is exactly like a task. No, it’s not like… it IS a task.

In fact, you can have a master task, assigned to user U1, in project P1, and its subtask assigned to user U2 in project P2.
You will see the subtask as a normal task, when looking at tasks of project P2 or user U2!

2 Likes