Skip to content

Commit

Permalink
Fix that the total was the taking tag filters into account (#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
almarklein authored Nov 21, 2023
1 parent 9bc3d03 commit c1e1970
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions timetagger/app/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2872,11 +2872,9 @@ def _generate_table_rows(self, t1, t2):
records.sort(key=lambda record: record.t1)

# Set (appropriately rounded) durations
total_duration = 0
for i in range(len(records)):
record = records[i]
record.duration = round_duration(min(t2, record.t2) - max(t1, record.t1))
total_duration += record.duration

# Determine priorities
priorities = {}
Expand Down Expand Up @@ -3015,6 +3013,9 @@ def _generate_table_rows(self, t1, t2):
rows = []

# Include total
total_duration = 0
for group in group_list2:
total_duration += group.duration
rows.append(["head", duration2str(total_duration), "Total", 0])

for group in group_list2:
Expand Down

0 comments on commit c1e1970

Please sign in to comment.