simpletask-android icon indicating copy to clipboard operation
simpletask-android copied to clipboard

Question: how to search for tasks w/o due date

Open Grydpype opened this issue 1 year ago • 3 comments

Dear all,

sometimes I forget to enter a due date into my tasks, so I would like to be able to search for all tasks that do not have a due date. How would I do that? Entering "not due:" into the search field yields alls tasks containing the (sub)string "not".

Any suggestions?

Cheers, Oliver.

Grydpype avatar Mar 27 '23 07:03 Grydpype

You can do this with a Lua filter. In the filter settings script tab add the following script (don't forget to enable it):

function onFilter(t,f,e)
    return f.due == nil
end 

mpcjanssen avatar Mar 28 '23 10:03 mpcjanssen

OK, that's interesting; I expected something like "not due:" which is how Sleek does it. I have no experience with Lua yet, so that will be interesting. Are there perhaps some more LUA scripts that might be useful; is there perhaps something like a LUA forum where I could look?

Thanks for the feedback, Oliver.

Grydpype avatar Mar 28 '23 19:03 Grydpype

Good morning, I implemented the script; works perfectly.

I moved the LUA-script section to the top in the sorting tab (so it looks like {LUA; due-date; priority; ...}) and hoped that the tasks found by the script would come on top, followed by the remaining tasks as specified by the sort order, but apparently the script is executed and the found tasks are displayed, but then the processing stops.

Is there a script that would get the tasks without a due date, display them first, and then continue with the remaining tasks?

(Or, as an alternative: could there be an option to automatically add today's date as default due date? That would also solve my issue ...)

Cheers, Oliver.

Grydpype avatar Apr 12 '23 07:04 Grydpype