Flattening outlinks in tasks

What I’m trying to do

  • I have tasks with links to projects and people

  • I want to filter tasks by their link to a project (or by people)

  • Projects files are in the folder Projects

  • People files are in the folder People

  • [ ] This is an example task for a project [[Hello World]]

  • [ ] This is an example task for a person [[Jane Doe]]

  • [ ] This is an example task for a project that involves a person [[Hello World]] [[Jane Doe]]

  • [ ] This is another different project [[Super Secret]]


What I want to see:

Hello World

  • [ ] This is an example task for a project [[Hello World]]
  • [ ] This is an example task for a project that involves a person [[Hello World]] [[Jane Doe]]

Super Secret

  • [ ] This is another different project [[Super Secret]]

What I see:

Things I have tried

TASK
FROM "Days"
WHERE !completed AND outlinks
GROUP BY outlinks