Skip to content
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-68] Cannot shorten interval which has been moved into an exclusion. #73

taskwarrior opened this issue Feb 11, 2018 · 6 comments


Copy link

@taskwarrior taskwarrior commented Feb 11, 2018

A M on 2017-03-09T16:23:54Z says:

Test patch attached. The test doe:

  • Creates some exclusions.
  • Tracks an interval not spanning any exclusions.
  • Moves the interval so that it spans an exclusion.
  • Attempts to shorten the moved interval.

The last step fails. Debug output indicates that the interval we are trying to create via shortening conflicts (overlaps) with the existing unshortened interval.

not ok 3 - shorten.t: test_shorten_interval_straddling_exclusion (TestShorten)

  1. ERROR: CommandError on file ./shorten.t line 84 in test_shorten_interval_straddling_exclusion: 'self.t("shorten @1 5min :debug") # Does not work.':
  2.     Command '['/home/icarus/code/timew/src/timew', 'shorten', '@1', '5min', ':debug']' finished with unexpected exit code '255'.
  3.     *** Start STDOUT ***
  4.     CLI Parser
  5.       _original_args
  6.         /home/icarus/code/timew/src/timew shorten @1 5min :debug
  7.       _args
  8.         word basename='timew' raw='/home/icarus/code/timew/src/timew' BINARY 
  9.         word canonical='shorten' raw='shorten' ORIGINAL CMD 
  10.         word raw='@1' value='1' ORIGINAL ID FILTER 
  11.         duration raw='5min' ORIGINAL FILTER 
  12.         word canonical=':debug' raw=':debug' ORIGINAL HINT FILTER 
  13.     >> 1 intervals
  14.     >> Found 0 holidays
  15.     >> Found 7 exclusions
  16.     >> Loaded 2 tracked intervals
  17.     >> Found 0 holidays
  18.     >> Found 7 exclusions
  19.     >> Loaded 2 tracked intervals
  20.     >> Input         interval @1 2017-03-08T13:00:00 - 2017-03-08T13:35:00
  21.     >> Overlaps with
  22.     >>              interval @1 2017-03-08T13:00:00 - 2017-03-08T13:40:00
  23.     >> Timer timew 0.003249 sec
  24.     *** End STDOUT ***
  25.     *** Start STDERR ***
  26.     You cannot overlap intervals. Correct the start/end time, or specify the :adjust hint.
  27.     *** End STDERR ***
@taskwarrior taskwarrior added this to the 1.1.0 milestone Feb 11, 2018
Copy link

@taskwarrior taskwarrior commented Feb 11, 2018

Migrated metadata:

Created: 2017-03-09T16:23:54Z
Modified: 2017-04-08T17:25:07Z
Copy link

@taskwarrior taskwarrior commented Feb 11, 2018

A M on 2017-03-09T16:55:35Z says:

Forgot to mention, I trigger this all the time using taskwarrior. I frequently do:

  • task start x # Gives me a timewarrior block with all tags defined on that task.
  • timew move @x # Move to when I actually started working on the task.
  • task stop x
  • timew shorten @x

Without the taskwarrior integration it's probably very unusual to trigger this bug.

Copy link

@taskwarrior taskwarrior commented Feb 11, 2018

Thomas Lauf on 2017-03-09T19:27:25Z says:

I haven't looked into it in detail, but to me the issue seem related with TI-58, where exclusions prevent intervals to be deleted.

Copy link

@taskwarrior taskwarrior commented Feb 11, 2018

Paul Beckingham on 2017-03-10T13:35:32Z says:

Patch applied, thank you.

Copy link

@taskwarrior taskwarrior commented Feb 11, 2018

Thomas Lauf on 2017-04-06T07:30:16Z says:

According to the definition of intervals, exclusions should not be applied to closed intervals. This is what happens here.
The other issue that needs to be investigated here is whether shortening a synthetic interval works. In this case, the interval needs to be converted to a real interval and then shortened.

Copy link

@pbeckingham pbeckingham commented Feb 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants