- Restores behaviour which got lost when switching to the new interval filtering in 9968b9e9
- Add test for each command
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
I left some unused varaibles in a new test functions after copy-paste.
This addresses @laufts comments on #423.
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
This fixes an error where the latest interval, a non-synthetic interval,
is added to the synthetic array (and marked synthetic) if flatten() is
otherwise not able to convert it to a group of synthetic intervals.
When modify was attempting to edit this interval, it would fail since
synthetic intervals should not be written to the database unless the
database is being flattened and timewarrior believed the interval to be
modified was synthetic.
Closes#422
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
This change introduces a new command that, like lengthen, move, resize, and
shorten, is intended to move and/or resize a record, but instead of taking an
interval, will take an absolute date/time.
This command is useful because it removes the need for the user to calculate
the time intervals to shorten / lengthen a record by. For example, if the user
accidentally forgot to stop tracking an interval before starting a new one,
but new they stopped working at a specific time, it is easy to simply modify
the end time of the interval that they had forgotten to stop.