Comparisons with NULL always yield ‘true’.
Lists all tasks without a startDate (startDate=NULL):
done = false && startDate<=now
Also lists all tasks without a startDate:
done = false && startDate>now
Consequently this also lists all tasks without a startDate:
done = false && ((startDate<=now) && (startDate>now))
And the expectation that the result of a comparison must always be boolean seems treacherous…
Because this also lists all tasks without a startDate:
done = false && NOT ((startDate<=now) && (startDate>now))
I guess the comparison with NULL yields in fact NULL and is just interpreted as true in the end (but not within braced expressions)?
But it is weird how it can be both in the past and in the future.
Tasks with no startDate appear in both filters, with startDate>now and startDate<=now.
I created three tasks in try:
with startDate passed
with startDate in the future
without startDate
and three filters:
startDate passed: startDate<=now
startDate in the future: startDate>now
startDate in the past, present AND future at the same time: startDate<=now && startDate>now
The third condition should be impossible to match.
However, the task without a startDate matches all three filters.
It may be because try runs an other/newer version than your installation.
I am on version: v0.24.1-606-297817d3f8 now and it works as expected.
Edit: Make sure to check off “Include tasks which don’t have a value set”.
I’m not the person who originally asked, but it does appear to be Typesense-related. The tasks without due dates are shown with a query for dueDate < '0003-01-03 00:00' when I disable Typesense.
Vikunja api version v0.24.6
Built with go1.23.4
I’m using version 27.1 of Typesense. Both Vikunja and the Typesense instance are running in (rootless) Docker containers.