Reverse tag listing?

Added by kartal kartal 135 days ago

Hi

I want to list all the tasks that matches except some tag or tags. The thing is that I can make a manual list of the tags I am interested in but that means that i cannot add any new tags along the way because then I need to edit my custom task list alias. So what I need is "task list everything except tag:project" which means I want to be able to list all the tasks that unmatches the tag "projects".

Is it possible>? I went through the samples and tried some stuff but I cannot seem to find a way.

thanks


Replies

RE: Reverse tag listing? - Added by Paul Beckingham 135 days ago

You can list tasks that do not have a particular tag with:

$ task list ... +yes -no

The '+' means has, and the '-' means does not have with respect to tags. If you want to list tasks that, for example, belong to some projects but not others, then it gets more tricky, because all the filters on the command line are combined with an implicit AND operation. If you are logically or mathematically inclined, and know DeMorgan's theroem, you can apply it like this:

$ task list ... project.isnt:foo project.isnt:bar

This only works because of the negation, and the implicit AND, so the above is essentially:

(NOT foo) AND (NOT bar)

which is equivalent to:

NOT (foo OR bar)

Task would benefit from the ability to build arbitrarily complex filters, but that would require support of AND, OR, NOT and parentheses for precedence control. At that point, it will have become quite complex.

RE: Reverse tag listing? - Added by kartal kartal 135 days ago

Hi

Thanks for the suggestions. These kind of do solve and do not solve my issues. It feels like it is half way there. There are cases when most of these options fail. One thing I notice that one needs to indicate a subproject explicitly. For example "task list project.is:MyProj" wont list the subprojects of MyProj, I need to write a rule for it like "task list project.isnt:MyProj.MySubProj" which will convolute things alot. I tend to think that it should be reverse, unless indicated TW should respect to parent project.

The other problem is when the user do not use projects as namespace in certain situations?. How can I hide items that do not have project namespace + some projects?

I would think that hopefully there would be some future revisiting these issues in the next releases. Really the filters are great in TW but in certain situations it feels like it is ineffective and gets convoluted

thanks