You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was looking for a way to automatically add tags based on the context you are in and I found this thread, specifically this comment, which denotes a bug not fixed yet and as of my search not reported either. The issue is three years old now, but the behaviour is still there:
If the modification string provided to define a context is given in one token, i.e. surrounded by quotes, and contains the OR operator, which is invalid here, the write context is still set with no warnings, and you end up messing up your tasks added in there.
When I then run task, I see the newly added task has prepended multiple instances of 'or' from the context definition to the description, one for each tag added to the task: or or this is a test
The task has three tags set, as expected: home personal work
EDIT: This is indeed a bug. If you omit the quotes around the context definition, you get a warning, and the write context will not be set
Specifications
Taskwarrior 2.6.2, 3.3.0.
Steps to reproduce
Run task context define mine +personal or +home or +work;
Notice that the write context is not set and the warning «not a valid modification string, because it contains the OR operator» so that the user sets it manually;
Run task context define mine "+personal or +home or +work";
Notice that the write context is set and no warning appear.
The text was updated successfully, but these errors were encountered:
Description
I was looking for a way to automatically add tags based on the context you are in and I found this thread, specifically this comment, which denotes a bug not fixed yet and as of my search not reported either. The issue is three years old now, but the behaviour is still there:
If the modification string provided to define a context is given in one token, i.e. surrounded by quotes, and contains the OR operator, which is invalid here, the write context is still set with no warnings, and you end up messing up your tasks added in there.
Specifications
Steps to reproduce
task context define mine +personal or +home or +work
;task context define mine "+personal or +home or +work"
;The text was updated successfully, but these errors were encountered: