Description
jamese
2010-02-15 01:18:38 UTC
I did this because all times are now aggregated from the events. However I understand you want this for usability reasons. I agree that this was a very useful feature, and I miss it quite a lot. Often, I don't remember to start timing a task (or even more often, I don't expect to spend more than a few minutes on it), so having a quick mechanism to add time to a given task after the fact is important. *** Bug 228366 has been marked as a duplicate of this bug. *** (In reply to comment #1) > I did this because all times are now aggregated from the events. This is not the first time your changes are removing existing and very useful functionality. For example, bug 196133 is still open. Why don't you realize that you are making a lot of people disappointed and angry? Where I work, basically everybody has stopped using ktimetracker, except me. I'm still using it not because I like it, but because the alternatives are not very good either. But now when you can't even edit task times, ktimetracker won't work at all for me. Please stop breaking a useful application. This is bad maintainership. This change has made the application unusable for me, and I'll have to find an alternative. You have to realize that there are two different ways of tracking time: 1) recording events (like ics is doing, and ktt 4.4 now tries), with blocks of <start time, end time> pairs. 2) total time spent, regardless of when it actually occurred. (2) is an extremely common use case. If I spend time on something, and know it was about an hour, but do not know when exactly I started, I'm not going to invent a timeslot to put it in--that's just too much effort (and a lie). I suggest, that to handle both cases, you add an internal "tare" to each item, that is simply an accumulator to handle (2). It simply gets added on to the total time summed from all the (1) events. I really don't see why supporting (1) is even necessary for the purpose that ktt fulfills. Supporting (1) as far as inputing data, sure, but once it's in ktt, it isn't used that way anymore--it's just accumulating time. Do a lot of ktt users actually want to export their time spent broken down by events? OK, I changed the edit task dialog for a reason. And that was that it can now be much easier be edited within qtcreator. However it became uglier and that is a regression. I apologize. The bug report is valid and it is not a "wish", but a "bug", to be concrete, a "regression". I am working on it, here is a preliminary fix: Index: taskview.cpp =================================================================== --- taskview.cpp (revision 1097013) +++ taskview.cpp (working copy) @@ -945,14 +945,11 @@ task->setName(taskName, d->mStorage); // update session time as well if the time was changed - long total, session, totalDiff, sessionDiff; - total = totalDiff = session = sessionDiff = 0; - DesktopList desktopList; - dialog->status(&desktopList); + if (!dialog->timeChange().isEmpty()) + { + task->changeTime(dialog->timeChange().toInt(),d->mStorage); + } - if ( totalDiff != 0 || sessionDiff != 0) - task->changeTimes( sessionDiff, totalDiff, d->mStorage ); - // If all available desktops are checked, disable auto tracking, // since it makes no sense to track for every desktop. if (desktopList.size() == _desktopTracker->desktopCount()) Index: task.cpp =================================================================== --- task.cpp (revision 1097013) +++ task.cpp (working copy) @@ -292,11 +292,6 @@ mDesktops = desktopList; } -void Task::changeTime( long minutes, timetrackerstorage* storage ) -{ - changeTimes( minutes, minutes, storage); -} - QString Task::addTime( long minutes ) { kDebug(5970) << "Entering function"; @@ -393,6 +388,11 @@ kDebug(5970) << "Leaving function"; } +void Task::changeTime( long minutes, timetrackerstorage* storage ) +{ + changeTimes( minutes, minutes, storage); +} + void Task::changeTotalTimes( long minutesSession, long minutes ) { kDebug(5970) Index: edittaskdialog.cpp =================================================================== --- edittaskdialog.cpp (revision 1097013) +++ edittaskdialog.cpp (working copy) @@ -66,6 +66,11 @@ return m_ui->tasknamelineedit->text(); } +QString EditTaskDialog::timeChange() +{ + return m_ui->letimechange->text(); +} + void EditTaskDialog::setTask( const QString &name ) { m_ui->tasknamelineedit->setText( name ); Index: edittaskdialog.ui =================================================================== --- edittaskdialog.ui (revision 1097013) +++ edittaskdialog.ui (working copy) @@ -16,13 +16,25 @@ <layout class="QGridLayout" name="gridLayout"> <item row="0" column="0"> <widget class="QLabel" name="tasknamelabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="text"> <string>Task Name:</string> </property> </widget> </item> - <item row="0" column="1"> + <item row="0" column="1" colspan="2"> <widget class="QLineEdit" name="tasknamelineedit"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="whatsThis"> <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> @@ -33,7 +45,46 @@ </property> </widget> </item> + <item row="1" column="0" colspan="3"> + <widget class="QPushButton" name="edittimespushbutton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="whatsThis"> + <string>To change this task's time, you have to edit its event history.</string> + </property> + <property name="text"> + <string>Edit Times</string> + </property> + </widget> + </item> <item row="2" column="0" colspan="2"> + <widget class="QLabel" name="label"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Change time (in minutes, e.g. -60)</string> + </property> + </widget> + </item> + <item row="2" column="2"> + <widget class="QLineEdit" name="letimechange"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + </item> + <item row="3" column="0" colspan="3"> <widget class="QGroupBox" name="autotrackinggroupbox"> <property name="title"> <string>Auto Tracking</string> @@ -47,7 +98,7 @@ <layout class="QGridLayout" name="gridLayout_2"/> </widget> </item> - <item row="3" column="0" colspan="2"> + <item row="4" column="0" colspan="2"> <widget class="QDialogButtonBox" name="buttonBox"> <property name="orientation"> <enum>Qt::Horizontal</enum> @@ -57,16 +108,6 @@ </property> </widget> </item> - <item row="1" column="1"> - <widget class="QPushButton" name="edittimespushbutton"> - <property name="whatsThis"> - <string>To change this task's time, you have to edit its event history.</string> - </property> - <property name="text"> - <string>Edit Times</string> - </property> - </widget> - </item> </layout> </widget> <resources/> Index: edittaskdialog.h =================================================================== --- edittaskdialog.h (revision 1097013) +++ edittaskdialog.h (working copy) @@ -10,6 +10,19 @@ class EditTaskDialog; } +/** + * Class to show a dialog in ktimetracker to enter data about a task. + * + * Holds task name and auto-tracking virtual desktops. + * + * Typically this class will be called by a taskview object to enter a new task + * or to edit an existing task. After quitting, you can read out task name and all + * properties till you delete the object. + * + * @short Class to show a dialog to enter data about a task + * @author Thorsten Staerk + */ + class EditTaskDialog : public QDialog { Q_OBJECT @@ -17,6 +30,7 @@ EditTaskDialog( TaskView *parent, const QString &caption, DesktopList* desktopList = 0 ); ~EditTaskDialog(); QString taskName(); + QString timeChange(); void setTask( const QString &name ); void status( DesktopList *desktopList) const; SVN commit 1100380 by tstaerk: I18N:Re-adding a field to manipulate a task's time relatively. CCBUGS:226915 M +5 -0 edittaskdialog.cpp M +14 -0 edittaskdialog.h M +53 -12 edittaskdialog.ui M +5 -5 task.cpp M +4 -7 taskview.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1100380 *** Bug 236776 has been marked as a duplicate of this bug. *** Created attachment 43570 [details]
Package for (K)Ubuntu 10.04 i386
I remark: try to follow the instructions and make this package yourself instead of installing what someone uploaded to internet.
Created attachment 43571 [details]
The files inside /usr/local/lib/ktimetracker, for ktimetracker_4.3.5-hacked_i386.deb
I remark: try to follow the instructions and obtain this files yourself instead of installing what someone uploaded to internet.
I was blocked, severily limited with ktimetracker without those capabilities of the 4.3 version, no alternative program had what ktimetracker had and trying to compile the svn version returned some hard errors... so finally I did some hacks in my Kubuntu 10.04 i386 to have the ktimetracker 4.3 version working. Note that I'm not a (K)Ubuntu expert or a package expert, some of you are, so you will do it in a better way, please comment it to make people's life somewhat better. I remark that those steps were made in a Kubuntu 10.04 for i386, your mileage may vary. I executed sudo apt-get remove ktimetracker to make sure I had not the new ktimetracker version installed. Executed mkdir /tmp/prior_ktimetracker cd /tmp/prior_ktimetracker wget http://yu.archive.ubuntu.com/ubuntu/pool/main/k/kdepim/ktimetracker_4.3.5-0ubuntu1~karmic1_i386.deb ar x ktimetracker_4.3.5-0ubuntu1~karmic1_i386.deb mkdir control cd control tar -xvf ../control.tar.gz kate control and in the opened Kate window, I replaced the text "libkdepim4 (=" with "libkdepim4 (>=", saved the file and closed Kate. I kept on executing: tar -cvzf control.tar.gz control md5sums cp -pr control.tar.gz .. cd .. ar -r ktimetracker_4.3.5-hacked_i386.deb debian-binary control.tar.gz data.tar.lzma and so I had a packaged named "ktimetracker_4.3.5-hacked_i386.deb" that I could use in the future (but reading this text first), so I saved it to my "home" folder executing cp ktimetracker_4.3.5-hacked_i386.deb ~ Note: those simplified steps generated a package that was ok for the use I was going to give it, but it was not a perfect package (for example, I had not updated the md5sums). Executed sudo dpkg -iEGB ~/ktimetracker_4.3.5-hacked_i386.deb to install the package, but it still lacked libraries. If I executed ktimetracker I obtained this error: "ktimetracker: symbol lookup error: ktimetracker: undefined symbol: _ZN4KPIM14PimApplicationC1Ev". So I executed: mkdir /tmp/prior_libkdepim cd /tmp/prior_libkdepim wget http://no.archive.ubuntu.com/ubuntu/pool/main/k/kdepim/libkdepim4_4.3.5-0ubuntu1~karmic1_i386.deb to download a file that contained the old libkdepim libraries. Executed: dpkg -x libkdepim4_4.3.5-0ubuntu1~karmic1_i386.deb . cd usr cd lib sudo mkdir /usr/local/lib/ktimetracker sudo cp -pr libkdepim.so.4 /usr/local/lib/ktimetracker sudo cp -pr libkdepim.so.4.3.0 /usr/local/lib/ktimetracker sudo bash -c 'echo -e "#!/bin/bash \n\n# We want the libkdepim.so.4.3.0 library only available to this version of ktimetracker, so we are not going to use ldconfig \nexport LD_LIBRARY_PATH=/usr/local/lib/ktimetracker \n/usr/bin/ktimetracker" > /usr/local/bin/ktime.sh' sudo chmod +x /usr/local/bin/ktime.sh sudo ln -s /usr/local/bin/ktime.sh /usr/local/bin/ktime And then I clicked with the secondary button of the mouse on the K menu icon, edited the menu "Applications > Utilities" and changed the "ktimetracker" so that it executed the "ktime" command instead of the "ktimetracker" one. I tried to launch ktimetracker and seemed to work well (although not some translated strings without much importance). Executed: cd / rm -rf /tmp/prior_libkdepim /tmp/prior_ktimetracker But in this situation, If I updated the system... it would update the ktimetracker program! So I executed: echo "ktimetracker hold" | sudo dpkg --set-selections to put the ktimetracker package 'on hold' so that the system did not "update" it. Of course, I cannot be made responsible of what happens if you follow this steps :-), they seemed to work ok for me. * * * Ok, Ok, I have attach "ktimetracker_4.3.5-hacked_i386.deb" for (K)Ubuntu 10.04 i386 and the files inside /usr/local/lib/ktimetracker but try to do it yourself instead of installing what someone uploaded to internet. Created attachment 43572 [details]
Ktimetracker 4.3.5 package for (K)Ubuntu 10.04 i386
I remark: try to follow the instructions and make this package yourself instead
of installing what someone uploaded to internet.
Created attachment 43573 [details]
"Ktimetracker 4.3.5 package for (K)Ubuntu 10.04 i386" needs those files inside /usr/local/lib/ktimetracker, for example
I remark: try to follow the instructions and obtain this files yourself instead
of installing what someone uploaded to internet.
Created attachment 43574 [details]
"Ktimetracker 4.3.5 package for (K)Ubuntu 10.04 i386" needs those files inside /usr/local/bin
I remark: try to follow the instructions and make this file yourself instead
of installing what someone uploaded to internet.
I found that "holding" a package went well in the command line but that if you used the Kpackagekit of Kubuntu 10.04... the package was not hold; if you used this program you can visit https://bugs.launchpad.net/ubuntu/+source/kpackagekit/+bug/581886?comments=all I found that "holding" a package went well in the command line but that if you used the Kpackagekit of Kubuntu 10.04... the package was not hold; if you used this program you could visit https://bugs.launchpad.net/ubuntu/+source/kpackagekit/+bug/581886?comments=all I am sorry, but this bug has been reported about four months ago now. Is there really no possibility to provide a better version than recipes for hacks and patches? It sheds a bad light on the product, indeed. My system updated KDE automatically on May 28th: Updated kdepim-6:4.4.2-1.fc12.i686 Update 6:4.4.3-1.fc12.1.i686 Was there really no possibility to bring the correction patch back with this official update? same here,I need this function back, please! hope fixing is coming soon.. I'd need this, too. When I'm working on a particular task, I'm often away from the computer, and often it's hard to allocate a particular time where I worked on it (i.e. five minutes there, five minutes there, etc.). Often, I can only guess the total time for a day, and I'd like to add that time to the tasks. Thanks, Antonio, for the help! I've followed the steps you outlined in Comment #12 and it works great. I'm running Kubuntu Lucid Lynx right now. Tstaerk, will ktimetracker be useable once again when Maverick comes out? It's been almost 8 months since this bug was introduced. Will it ever be fixed without having to resort to hacking and patching files? Created attachment 53524 [details] Instructions to have the ktimetracker 4.3 version working Meanwhile this is solved... For Kubuntu 10.10 I've repeated the steps told in the comment #12 and it worked well. I just had to be careful because this http://bugs.kde.org reporting system... breaks the long lines into several ones. That is nice for normal text, but inserting "carriage returns" in lines of code... brings problems, so I copied the instructions in the attached file. As the attached file is free of the problem of the "carriage returns", it's better to follow it instead of the comment #12. Created attachment 53525 [details]
Instructions to have the ktimetracker 4.3 version working
I've updated the "Instructions to have the ktimetracker 4.3 version working" attached file.
With the latest update to KTimeTRacker it's now possible to add and remove a certain amount of minutes to each task very easily. Shouldn't this be marked as solved? No. I'm using 4.4.5 (4.4.7 ebuild) and the functionality is not present. Until the functionality is restored in upstream (no patching necessary), it is not resolved. (In reply to comment #26) > No. I'm using 4.4.5 (4.4.7 ebuild) and the functionality is not present. > Until the functionality is restored in upstream (no patching necessary), it is > not resolved. I completely agree. This is not about what can be done, but about what has been done for the end user. What is presently preventing the patch from going to the next official release? (In reply to comment #27) > I completely agree. This is not about what can be done, but about what has been > done for the end user. What is presently preventing the patch from going to the > next official release? I'm and end-user. I haven't patched anything. It's fixed in 4.5.3, at least on openSUSE. Is the 4.4 branch still receiving updates? If the problem is in the changes made in the 4.5 branch being back-ported or not to 4.4 then this bug remains open, but in the current 4.5.3 version this is already fixed. In (K)Ubuntu it's apparently not fixed in version 4.5.3, so maybe openSUSE is manually including that patch? I don't think so. I'm using openSUSE 11.3 and the bug is still there. $ ktimetracker --version Qt: 4.7.1 KDE: 4.5.3 (KDE 4.5.3) KDE-Zeitplaner: 4.4.5 Ricardo, can you give more details? I got the updated KTimeTracker from the KDE:Distro:Factory repository. Since this repository is what is going to be in the next stable version (11.4), I'm pretty sure this will be solved on the next openSUSE official release. I don't know about Ubuntu though. More info on the repo here: http://en.opensuse.org/KDE_repositories#Factory_.28KDE_SC_4.5.29. I can understand the decision to not mark this as solved since it's still not easily available. @Jörg That is pretty strange since those are also the exact versions I got from ktimetracker --version, although in YaST the version appears as 4.4.7-245.3. Indeed, after some investigation, this seems to be an openSUSE only patch as indicated by this Build Service request: https://build.opensuse.org/request/show/52645. I really hope this makes it upstream soon though, so others can benefit from it. Ok, this is fixed. Please find the next task edit dialog here: http://community.kde.org/images.community/c/ca/Snapshot-add-edit-task.png - if you look at the mouse cursor, that is where you can add/subtract time. The patch is described at http://websvn.kde.org/?view=rev&revision=1100380 |