Version: 4.4.10 (using KDE 4.6.0) OS: Linux After creating a file in the standalone KTimeTracker application and tracking a few tasks, I opened it in the KTimeTracker component of Kontact and all times were displayed as 00:00. Opening it back again in the standalone KTimeTracker showed the correct times. Reproducible: Always Steps to Reproduce: 1. Open the standalone KTimeTracker 2. Create a new file 3. Save the file and then add a task (in this order or else you'll end up with a 0 byte file and loose all data, that's another bug) 3. Track/edit the task so that is has more than 00:00 4. Close KTimeTracker 5. Open Kontact 6. Go to the KTimeTracker component and open the previously saved file Actual Results: Behold all times reset back to 00:00 Expected Results: The actual times get displayed
The other way around gives the same result BTW.
I think the reason for this is the X-KDE-ktimetracker-duration in timetrackerstorage.cpp.
I think this patch should make the difference. ToDo: Test, explain here why and look for possible refinements: diff --git a/ktimetracker/timetrackerstorage.cpp b/ktimetracker/timetrackerstorage.cpp index 004d0af..cd82fae 100644 --- a/ktimetracker/timetrackerstorage.cpp +++ b/ktimetracker/timetrackerstorage.cpp @@ -974,7 +974,7 @@ void timetrackerstorage::changeTime(const Task* task, const long deltaSeconds) e->setDtEnd(KDateTime(end, KDateTime::Spec::LocalZone())); // Use a custom property to keep a record of negative durations - e->setCustomProperty( KGlobal::mainComponent().componentName().toUtf8(), + e->setCustomProperty( "ktimetracker", QByteArray("duration"), QString::number(deltaSeconds));
Hello! Sorry to be the bearer of bad news, but this project has been unmaintained for many years so I will be closing this bug.
KTimeTracker is now ported to Qt5/KF5, however the Kontact plugin is dropped since the KDE PIM team and I agreed that KTimeTracker is not very relevant to KDE PIM/Kontact. Thus, this bug is still RESOLVED as UNMAINTAINED.