GothenburgBitFactory / GothenburgBitFactory/tasklib
Raw filters don't seem to be working as intended
- Dominant language
- Python
- Stars
- 159
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
Let's say I have a task folder in `~/_sample_data`.
The output of `unset TASKRC; task rc.data.location=~/_sample_data` is (removing the "configuration override" notes):
```
ID Age Tag Description Urg
2 5min habit another task 0.8
1 5min sample task 0
2 tasks
```
I then tried to use it this way:
```python
from tasklib import TaskWarrior
import os
del os.environ["TASKRC"] # just to be sure it isn't my config's fault
tw = TaskWarrior(f"{os.environ['HOME']}/_sample_data")
print(tw.tasks.filter("status:pending")) # yields the two tasks
print(tw.tasks.filter("status:pending +habit")) # yields no task (was supposed to yield one)
print(tw.tasks.filter("+habit")) # yields one task, as expected
print(tw.tasks.filter(status="pending", tag="habit")) # yields one task ~ this one works fine as well
```
The shown output is then:
```
[sample task, another task]
[]
[another task]
[another task]
```
But what was expected:
```
[sample task, another task]
[another task]
[another task]
[another task]
```
It seems like only raw filters that have more than one condition are affected by this.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.