[Kde-pim] Re: ktimetracker and negative times - is this intended? because there are quite some problems with that

Cristi P cristi.posoiu at gmail.com
Sat Apr 16 10:06:44 BST 2011


below, inline.

On Sat, Apr 16, 2011 at 10:57 AM, <thorsten at staerk.de> wrote:

> > In ktimetracker, if you edit a task, you can enter negative times in the
> > duration field - and even the example near the input box shows such a
> > thing.
> > It seems that this generates events, w/ a start time, no end time, and
> > some
> > specific property.
> > But, there are problems:
> > * that property is never read and used
> > * tasks having such an event will automatically start at load time even
> > though they shouldn't (that's what I think and almost tested that it
> > happens)
> > * such events are displayed in the history dialog as having an end time
> > equal to start time (you're not shown the info about the negative time)
> > * deleting from history such an event, is incorrectly recomputing total
> > task
> > time - I think it is summing the rest of the events - and not by looking
> > at
> > that duration property
> > * the DBus functions are *not* allowing negative times for the same kind
> > of
> > change
> >
> > So... please let me know what was/is the intention regarding accepting or
> > not negative times.
>
> As discussed on chat, ktimetracker is event-based. It can hold todos and
> events. I use todo and task synonymously. An event holds a task, a start
> time and an end time. With version 4 you can edit your history (meaning
> you can change the start and end time of an event). This means there must
> be an opportunity to re-calculate the "total time" of every task after you
> are finished editing the history. This lead to my decision that the "total
> time" should be the sum of all events' duration.
> Now, to be able to subtract time from a task, you will need an event with
> a negative duration.
>
> problems being:
- negative duration is set by setting a start time, NO end time (wonder what
korganizer is doing w/ that), NO duration field,
and a ktimetracker *specific* duration field called "duration" - see the
storage.cpp file, around line 940 and 960.
  And that property is never read, as I saw it
- edittaskdialog allows negative times, but the dbus equivalent - doesn't.
check timetrackerwidget...cpp:bookTime() and the
if ( minutes <= 0 ) return KTIMETRACKER_ERR_INVALID_DURATION;
- tasks that are having an event w/ that ktimetracker specific field set
(negative duration) - will get resumed at ktimetracker restarts, when it
actually shouldn't (there's a bug report about tasks resuming when they
shouldn't)

as for tasks /session times - I see in task.cpp in asTodo() for example, use
of 3 specific properties, including some task total time - which suggests
that task times are *not* a sum of event's durations. As I looked at the
code - I think there can be various problems w/ refreshing/recalculating
tasks times :-(


> The thing is that I am using may times the negative values to correct a
> > bit
> > the times (and if allowed - I would see the implementation in a different
> > way), and I get into
> > the problem of several tasks being in running state if I restart my
> > computer/kde/program - which messes all the timings.
> > I'd like to fix that, but would need more info.
> > Regards.
> > _______________________________________________
> > KDE PIM mailing list kde-pim at kde.org
> > https://mail.kde.org/mailman/listinfo/kde-pim
> > KDE PIM home page at http://pim.kde.org/
> >
>
>
> _______________________________________________
> KDE PIM mailing list kde-pim at kde.org
> https://mail.kde.org/mailman/listinfo/kde-pim
> KDE PIM home page at http://pim.kde.org/
>
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list