Taskwarrior: [TW-1696] Certain symbols in a filter cause errors

Created on 14 Feb 2018  路  7Comments  路  Source: GothenburgBitFactory/taskwarrior

_Alan Young on 2015-09-16T14:07:07Z says:_

If any of '!', '%', '^', '*', '-', '/', '[' or '{' are included in a filter string task errors with one of the following, depending on the symbol.

Cannot divide real numbers by strings
Cannot exponentiate strings
Cannot modulo string values
Cannot multiply strings by strings
Cannot subtract strings
Unmatched {
Unmatched [ or [^

I've attached the bash script and output files.

bug

Most helpful comment

It appears the whole expression parsing is very problematic in general and also messes up custom fields (key:value arguments to task add). Thus #2197 seems also related to #2124 and this issue here.

All 7 comments

Migrated metadata:

Created: 2015-09-16T14:07:07Z
Modified: 2016-01-12T04:51:38Z

_Paul Beckingham on 2015-09-19T13:08:44Z says:_

Those symbols are all mathematical operators, and when found, cause Taskwarrior to attempt an expression evaluation. This is deliberate behavior, and technically not a bug.

But it's also not nice, so I'd like to improve this, and so will leave this issue open.

Because JIRA issue IDs are of the form PROJECT-1234, I would like to tag my tasks like this. But task 987 mod +PROJECT-1234 sets the description instead. (task 987 mod +PROJECT works as expected.)

Also, I cannot filter for them:

# task +PROJECT-1234 start
Cannot subtract from a Boolean value

@fdcds: This issue was reported several times already in various forms. I collected some of them in #2124.

It appears the whole expression parsing is very problematic in general and also messes up custom fields (key:value arguments to task add). Thus #2197 seems also related to #2124 and this issue here.

_Paul Beckingham on 2015-09-19T13:08:44Z says:_

Those symbols are all mathematical operators, and when found, cause Taskwarrior to attempt an expression evaluation. This is deliberate behavior, and technically not a bug.

But it's also not nice, so I'd like to improve this, and so will leave this issue open.

@pbeckingham: can we implement just an explicit search syntax so that task wouldn't try it's heuristics and do just a simple substring matching (even not a regexp search), please?

PS. Is there any other way to find out the task id if you know its full description?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JavaZauber picture JavaZauber  路  3Comments

MarcelPa picture MarcelPa  路  3Comments

taskwarrior picture taskwarrior  路  8Comments

ulope picture ulope  路  9Comments

xerus2000 picture xerus2000  路  5Comments