Query rule 'reports.<name>.range' for the specific default range of the report.
Use rule 'reports.range' to configure an overall default range for all reports.
Make internal reports 'summary', 'month', 'week', 'day', and 'gaps' use this feature.
Closes#477
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This patch checks if intervals are given on cli to 'timew export', and
if so will filter only those numbered IDs out from the db. This lets
the user that already knows the interval(s) they want to know about, to
ask for only those, without parsing the whole thing (similar to how we
can do this for taskwarrior IDs).
If both intervals and other filters -- time range or tags -- are given,
this is considered an error. There would seem to be little use to AND
or OR tags/ranges with IDs because anyone that knew IDs to request would
already know those IDs met their requirement.
Fixes#510
Code additions from @lauft PR notes (thanks!):
- factor out 'filtering' so we can do only one call to getTracked()
- simplify (tag || range) to .empty(), which already checks both
- error message phrasing
Signed-off-by: Scott Mcdermott <scott@smemsh.net>
- Replace unused return variables with '_'
- Use 'expected' and 'actual' for test values
- Add whitespace
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
The command timew help should redirect to the man tool.
Instead of testing that the header of the output matches some reg ex,
test that the outputs of `timew help` and `man` are equal
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
The error message may be different depending on the man tool used.
Therefore, instead of hard-coding it into the test, ensure it is the same as produced by the man command
Closes#512
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
Use interval array to determine whether there is data to display
Move interval truncation outside the loop, combine/rework 'no data' messages
Close#450
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
Needed to allow database to be kept on some network filesystems
(GothenburgBitFactory/libshared#70).
fixes#465
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
- 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>
With 179a6153, all 'end of' named dates point to the last second of the respective interval.
(see GothenburgBitFactory/taskwarrior#2519)
Redefine hint intervals in Timewarrior by 'start of' named dates, such that their ranges comprise the full interval as expected.
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>