taskwarrior
taskwarrior copied to clipboard
Wrong task description when using a context with 'and' clause
Bug report
- What command(s) did you run?
rm -rf ~/.task
task context define customer1 project:work and +customer1
task context customer1
task add test
- What did you expect to happen?
- one task "test" added to project 'work' with tag 'customer1' set
- What actually happened?
- one task "and test" added to project 'work' with tag 'customer1' set
- Output of the command
task:
ID Age Project Tag Description Urg
1 5min work customer1 and test 1.8
1 task
Context 'customer1' set. Use 'task context none' to remove.
There are 8 local changes. Sync required.
- Paste the output of the
task diagcommand.
task 3.0.0
Platform: Linux
Compiler
Version: 11.4.0
Caps: +stdc +stdc_hosted +LP64 +c8 +i32 +l64 +vp64 +time_t64
Compliance: C++17
Build Features
Commit: 06fdfc5af
CMake: 3.22.1
libuuid: libuuid + uuid_unparse_lower
Build type: release
Configuration
File: /home/jerome/.config/task/taskrc (found), 1529 bytes, mode 100664
Data: /home/jerome/.task (found), dir, mode 40775
Locking: Enabled
GC: Enabled
$EDITOR: nvim
Hooks
System: Enabled
Location: /home/jerome/.task/hooks
(-none-)
Tests
Terminal: 204x52
Dups: Scanned 1 tasks for duplicate UUIDs:
No duplicates found
Broken ref: Scanned 1 tasks for broken references:
No broken references found
Hei, does it give you the desired result if you use
context.customer1.read=project:work +customer1
context.customer1.write=project:work +customer1
or over
task context define customer1 project:work +customer1
as a context definition, eg. leaving out the and in the definition of the context?
Did this issue only arise when updating to 3.0.0? Since I can reproduce your bug under the 2.6.2 version.
I can reproduce this with 2.6.2 as well.