Your first query filters out every thing except those eq to 0.
The next query uses the results of your first query before it beings, and then filters out every thing it found. When it gets to neq to 0, and the result is nothing, the filter then shows every task as a result, including the closed tasks. The filters build on each other, they don’t combine.
You would need to build your own filter in order to filter what you want.
I tried, but without success for now.
I created a new class DateWithNull.php (code below)
I can call the filter with due_with_null:<today
it returns tasks with date_due=0, but also with date_due > today…
I don’t understand.
I activated the logs and I can see the SQL request : SELECT * FROM “tasks” WHERE (“date_due” = ? OR “date_due” < ?) (do you know how I can display the valuies for the placeholders?)
adding an error_log statement, I have :
[Mon Dec 10 20:04:06.664503 2018] [:error] [pid 8396] [client 147.99.103.130:57091] Methode = lt
[Mon Dec 10 20:04:06.664537 2018] [:error] [pid 8396] [client 147.99.103.130:57091] timestamp = 1544396400
executing the previous SQL with this timestamp returns the right tasks…
any idea to troubleshoot that?
Thank you for your help
Gérald
/**
Get search attribute
@access public
@return string[]
*/
public function getAttributes()
{
return array(‘due_with_null’);
}
Hi Creecros,
indeed, it works well with your code, I didn’t includ a return statement in the apply function before.
thank you very much!!
Will you include this filter in you plugin?