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)
|
Paul Beckingham (Principal Author)
|
||||||
Federico Hernandez (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:
|
The following submitted code, packages or analysis, and deserve special thanks:
|
||||||
|
|
||||||
Renato Alves
|
Renato Alves
|
||||||
Tomas Babej
|
|
||||||
Dirk Deimeke
|
|
||||||
Wim Schuermann
|
Wim Schuermann
|
||||||
Jelle van der Waa
|
Jelle van der Waa
|
||||||
Sergey Trofimov
|
Sergey Trofimov
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
(thanks to Jelle van der Waa).
|
(thanks to Jelle van der Waa).
|
||||||
- TI-2 Two line tags causes false entry in database
|
- TI-2 Two line tags causes false entry in database
|
||||||
(thanks to Sebastian Uharek).
|
(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
|
- TI-4 The 'timew' command considers only the last interval
|
||||||
(thanks to Tomas Babej).
|
(thanks to Tomas Babej).
|
||||||
- TI-5 Unicode tags not working.
|
- TI-5 Unicode tags not working.
|
||||||
|
|
|
@ -467,17 +467,25 @@ static void renderInterval (
|
||||||
time_t& work,
|
time_t& work,
|
||||||
bool ids)
|
bool ids)
|
||||||
{
|
{
|
||||||
|
Datetime now;
|
||||||
auto spacing = rules.getInteger ("reports." + type + ".spacing");
|
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);
|
auto day_range = getFullDay (day);
|
||||||
if (! day_range.overlap (track.range) ||
|
if (! day_range.overlap (track.range) ||
|
||||||
(track.range.is_open () && day > Datetime ()))
|
(track.range.is_open () && day > now))
|
||||||
return;
|
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);
|
Interval clipped = clip (track, day_range);
|
||||||
if (track.range.is_open ())
|
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 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 ();
|
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