Yes they are sub-tasks, but the project shows up in “My Tasks” for sub-tasks so why not in a search?
The highlighted task in both screenshots are the exact same task.
This is expected behavior. Subtasks do not actually belong to a project, unless they are intentionally added by pressing “Tab P” from the view pane and selecting said project.
I believe this was intentional to allow flexibility. Subtasks can sometimes be related to multiple projects or may just be detailed breakdowns that don’t always need project-level visibility.
I wonder though, if it is only added by pressing “tab P” (which has not been done to this task) then why is the project listed in the “My Tasks” view but not the search view?
@Barbara_Losi this was actually a new feature added in August, as shown in this post. It was requested that subtasks included project visibility in My tasks view. I agree it could be useful to be able to sort and search by that as well.