Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

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

Open
Grydpype opened this issue Mar 27, 2023 · 3 comments
Open

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

Grydpype opened this issue Mar 27, 2023 · 3 comments

Comments

@Grydpype
Copy link

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.

@mpcjanssen
Copy link
Owner

mpcjanssen commented Mar 28, 2023

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 

@Grydpype
Copy link
Author

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
Copy link
Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants