New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TI-78] Tag parsing broken for tags starting with "or_" #82

Closed
taskwarrior opened this Issue Feb 11, 2018 · 6 comments

Comments

Projects
None yet
2 participants
@taskwarrior

taskwarrior commented Feb 11, 2018

Lukas Barth on 2017-06-12T19:16:34Z says:

Hi, 

it looks like something breaks when I start tracking with the tags "or_c1" and "or_root". Consider this:
{code:java}
tinloaf(at)janeway /m/d/h/t/s/moder $ timew
There is no active time tracking.
tinloaf(at)janeway /m/d/h/t/s/moder $ timew summary
No filtered data found in the range 2017-06-12T00:00:00 - 2017-06-13T00:00:00.
tinloaf(at)janeway /m/d/h/t/s/moder $ timew start 'test_t1' 'test_t2'
Tracking test_t1 test_t2
Started 2017-06-12T21:07:14
Current 14
Total 0:00:00
tinloaf(at)janeway /m/d/h/t/s/moder $ timew
Tracking test_t1 test_t2
Started 2017-06-12T21:07:14
Current 17
Total 0:00:03
tinloaf(at)janeway /m/d/h/t/s/moder $ timew stop
Recorded test_t1 test_t2
Started 2017-06-12T21:07:14
Ended 23
Total 0:00:09
tinloaf(at)janeway /m/d/h/t/s/moder $ timew start 'or_c1' 'or_root'
Tracking or_c1 or_root
Started 2017-06-12T21:07:36
Current 36
Total 0:00:00
tinloaf(at)janeway /m/d/h/t/s/moder $ timew
Tracking _c1 _root or
Started 2017-06-12T21:07:36
Current 38
Total 0:00:02
tinloaf(at)janeway /m/d/h/t/s/moder $ timew stop
You cannot overlap intervals. Correct the start/end time, or specify the :adjust hint.{code}
The underscore does not seem to be the problem, since 'test_t1' and 'test_t2' work. However, it is also strange how the message right after "start 'or_c1' 'or_root'" says "Tracking or_c1 or_root", and the next message says "Trackung _c1 _root or", as if the tags were split at the underscore.

Also, for some reason this seems to break timewarrior completely: I can't stop the time tracking afterwards.

If I can help in any way with debugging this, please let me know.

Kind regards,

Lukas

@taskwarrior taskwarrior added this to the 1.1.0 milestone Feb 11, 2018

@taskwarrior

This comment has been minimized.

taskwarrior commented Feb 11, 2018

Migrated metadata:

Created: 2017-06-12T19:16:34Z
Modified: 2017-08-05T09:18:08Z
@taskwarrior

This comment has been minimized.

taskwarrior commented Feb 11, 2018

Lukas Barth on 2017-06-14T12:50:45Z says:

The problem is that the lexer (which is used to tokenize the line read from the datafile) does not accept "_" in words. Thus, tags containing underscores must be quoted in the data file. See my attached patch.

@taskwarrior

This comment has been minimized.

taskwarrior commented Feb 11, 2018

Lukas Barth on 2017-06-16T13:29:28Z says:

Forgot to do unit testing. Added a test for underscore escaping, all tests passing.

@taskwarrior

This comment has been minimized.

taskwarrior commented Feb 11, 2018

Paul Beckingham on 2017-06-16T22:29:33Z says:

Nice, thank you.  Will take a look shortly.

@taskwarrior

This comment has been minimized.

taskwarrior commented Feb 11, 2018

Paul Beckingham on 2017-08-05T09:18:08Z says:

Patches applied, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment