https://bugs.kde.org/show_bug.cgi?id=508132

Kristen McWilliam <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|CONFIRMED                   |RESOLVED
      Latest Commit|                            |https://invent.kde.org/pim/
                   |                            |ktimetracker/-/commit/31e3b
                   |                            |cc4e0842e896a43f6087a04bc55
                   |                            |ace0a6dc

--- Comment #3 from Kristen McWilliam <[email protected]> ---
Git commit 31e3bcc4e0842e896a43f6087a04bc55ace0a6dc by Kristen McWilliam, on
behalf of Łukasz Żarnowiecki.
Committed on 26/02/2026 at 19:13.
Pushed by merritt into branch 'master'.

Fix session time calculation

KTimetracker relies on field `X-KDE-ktimetracker-totalSessionTime` when
loading ics file to present session time.  Sometimes this drifts from
sum of all `VEVENT`s in `VTODO`.  Most likely it is not updated in
some edge cases.

I examined the code and IMHO there is no need for that field to event
exists. This information can be easily calculated from existing
`VEVENT`s. Perhaps it was there to speed things up, but having same
information written twice can sometimes cause issues like this. I loaded
test file that I found on KDE page that weighs 1.3MB and it works fine.

My solution is just to get rid of that field and rely on individual
computations of each `VEVENT`.

M  +2    -0    src/base/timetrackerstorage.cpp
M  +1    -17   src/model/task.cpp
M  +0    -2    src/model/task.h
M  +0    -4    src/tests/storagetest.cpp
M  +0    -4    test/csvexporthistorytest.ics

https://invent.kde.org/pim/ktimetracker/-/commit/31e3bcc4e0842e896a43f6087a04bc55ace0a6dc

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to