I was working in a project and I wasn’t getting the results I wanted. I wanted to get certain tasks that were due within the next fourteen days.
Part of the problem is how I organize my projects, but I have strong reasons for doing it so, and I don’t plan to change that any time soon. This is what this particular file looks like,
Project:
SubProject:
SubProject: @due(2016-07-07)
Another SubProject:
Wanted tasks:
- Task 1
- Task 2
- Task 3
When I ran the logical query below,
@due > [d] @today and @due <[d] +15d
I was getting something like this,
Project:
SubProject:
SubProject: @due(2016-07-07)
The tasks were there, but they were collapsed under a couple layers of collapsed projects and I didn’t like to spend four extra seconds every time I wanted to see those tasks.
So, how did I get what I wanted without having to run a script?
Because I knew that I wanted the descendants of those dates, I knew I could use something like //*
. What it took me a minute of experimentation was to put the @due > [d] today and @due < [d] today +14d
in a parenthesis and format my query like this,
(@due > [d] today and @due < [d] today +14d)//*
That worked, but I wanted to only see the tasks underneath “wanted tasks”, so I tried the following, and it worked
(@due > [d] today and @due < [d] today +14d)//wanted/*
I had to put //
after the due date, because the project I was looking for was not a “child”, but a “descendant”. After “wanted” I didn’t have to go past the children since I knew my tasks were there, so only a /
was necessary after that. I didn’t have to write “Wanted tasks” because TaskPaper is blow your mind amazing
Hope this helps somebody and it saves you a couple minutes later on.