mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
TI-3: The month report shows multi-days current task truncated
- Thanks to Tomas Babej.
This commit is contained in:
parent
70d6b487ba
commit
6dc7a021a4
3 changed files with 15 additions and 5 deletions
4
AUTHORS
4
AUTHORS
|
@ -3,12 +3,12 @@ contributions of the following people:
|
|||
|
||||
Paul Beckingham (Principal Author)
|
||||
Federico Hernandez (Principal Author)
|
||||
Dirk Deimeke (Technical Advisor)
|
||||
Tomas Babej (Contributing Author)
|
||||
|
||||
The following submitted code, packages or analysis, and deserve special thanks:
|
||||
|
||||
Renato Alves
|
||||
Tomas Babej
|
||||
Dirk Deimeke
|
||||
Wim Schuermann
|
||||
Jelle van der Waa
|
||||
Sergey Trofimov
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
(thanks to Jelle van der Waa).
|
||||
- TI-2 Two line tags causes false entry in database
|
||||
(thanks to Sebastian Uharek).
|
||||
- TI-3 The month report shows multi-days current task truncated
|
||||
(thanks to Tomas Babej).
|
||||
- TI-4 The 'timew' command considers only the last interval
|
||||
(thanks to Tomas Babej).
|
||||
- TI-5 Unicode tags not working.
|
||||
|
|
|
@ -467,17 +467,25 @@ static void renderInterval (
|
|||
time_t& work,
|
||||
bool ids)
|
||||
{
|
||||
Datetime now;
|
||||
auto spacing = rules.getInteger ("reports." + type + ".spacing");
|
||||
|
||||
// Make sure the track only represents one day.
|
||||
// Ignore any track that doesn't overlap with day.
|
||||
auto day_range = getFullDay (day);
|
||||
if (! day_range.overlap (track.range) ||
|
||||
(track.range.is_open () && day > Datetime ()))
|
||||
(track.range.is_open () && day > now))
|
||||
return;
|
||||
|
||||
// If the track is open and day is today, then closed the track now, otherwise
|
||||
// it will be rendered until midnight.
|
||||
Interval clipped = clip (track, day_range);
|
||||
if (track.range.is_open ())
|
||||
clipped.range.end = Datetime ();
|
||||
{
|
||||
if (day_range.start.sameDay (now))
|
||||
clipped.range.end = now;
|
||||
else
|
||||
clipped.range.end = day_range.end;
|
||||
}
|
||||
|
||||
auto start_mins = (clipped.range.start.hour () - first_hour) * 60 + clipped.range.start.minute ();
|
||||
auto end_mins = (clipped.range.end.hour () - first_hour) * 60 + clipped.range.end.minute ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue