Commit graph

18 commits

Author SHA1 Message Date
Thomas Lauf
14bed139f6 Update copyrights
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-04-04 22:44:44 +02:00
Thomas Lauf
993ae85d5c Add check whether requested intervals have been found when searching by ID
- 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>
2022-01-09 11:43:56 +01:00
Thomas Lauf
379959e017 Optimize imports
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-27 21:11:31 +02:00
Shaun Ruffell
e170e344af test/modify: Remove a few unused variables
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>
2021-05-19 12:22:22 +02:00
Shaun Ruffell
bba56cc633 getIntervalsById: Only add truly synthetic intervals to synthetic vector
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>
2021-05-16 12:43:49 +02:00
Tomas Babej
e5870380a4
doc: Update copyright to 2021 2021-01-02 02:52:39 -05:00
Thomas Lauf
ad58309159 Update Copyright
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-04-19 12:41:23 +02:00
Shaun Ruffell
f45734efe0 test:modify.t: Split tests to for synthetic / non-synthetic intervals
Split the single test for synthetic interval into two separate tests.
2020-01-26 19:49:23 +01:00
Shaun Ruffell
d9480b591a CmdModify: Allow modification of synthetic intervals
This fixes an issue in the modify command since it was first added. This will
allow modify to work in the presence of synthetic intervals.
2020-01-17 17:48:57 +01:00
Thomas Lauf
9dd8257cc0 Replace assertEquals with assertEqual
- #259

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-12-11 10:20:33 +01:00
Thomas Lauf
7fa7ca5f04 Remove vim annotations
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-12-11 10:20:33 +01:00
Thomas Lauf
f53e1cef6d Switch to python 3
- #259

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-12-11 10:20:32 +01:00
Thomas Lauf
8b5a701eeb Require python2 not python2.7 for tests
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-06-29 01:31:08 +02:00
Thomas Lauf
712b4b78b2 Revert "Run test with available python"
This reverts commit 6b89e122

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-06-24 21:10:57 +02:00
Thomas Lauf
6b89e12287 Run test with available python
- do not enforce python 2.7

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-06-22 21:21:11 +02:00
Thomas Lauf
5c6bd53e02 Fix file mode 2019-02-27 22:08:29 +01:00
Thomas Lauf
2026296bf5 Update AUTHORS, ChangeLog
- Fix copyright dates
2018-12-06 21:08:30 +01:00
Shaun Ruffell
ceca4c817e #131: Introduce 'modify' to adjust historical records to fixed date/time.
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.
2018-11-30 22:27:08 +01:00