section in Status Bar for calculated information about selected items
For example, a total time section in the status bar when selecting tasks in the effort view to easily see how many time you spend for a specified set of tasks.
These calculations should be for all tasks when none (or maybe when just one) are selected but show for just selected when multiple are selected
Patch applied.
-
Ivan Romanov commented
I wrote a patch for this.
diff --git a/taskcoachlib/gui/viewer/effort.py b/taskcoachlib/gui/viewer/effort.py
index 72ca118..663af33 100644
--- a/taskcoachlib/gui/viewer/effort.py
+++ b/taskcoachlib/gui/viewer/effort.py
@@ -375,10 +375,17 @@ class EffortViewer(base.ListViewer,
return item in super(EffortViewer, self).curselection()
+ def __sumTimeSpent(self, efforts):
+ td = date.TimeDelta()
+ for effort in efforts:
+ td = td + effort.duration()
+ return td
+
def statusMessages(self):
- status1 = _('Effort: %d selected, %d visible, %d total') % \
+ status1 = _('Effort: %d selected, %d visible, %d total. Time spent: %s selected, %s visible, %s total') % \
(len(self.curselection()), len(self.presentation()),
- len(self.taskFile.efforts()))
+ len(self.taskFile.efforts()), str(self.__sumTimeSpent(self.curselection())),
+ str(self.__sumTimeSpent(self.presentation())), str(self.__sumTimeSpent(self.taskFile.efforts())))
status2 = _('Status: %d tracking') % \
self.presentation().nrBeingTracked()
return status1, status2 -
AdminAaron Wolf (Admin, Task Coach) commented
It would be really nice if this could be user-adjustable so that it could show specifically information that users don't want to use up a column space for. It would offer quick extra details for single tasks or calculations for multiple tasks.
-
al commented
I normally have a viewer that shows me the things that I have marked as due today, to show me what I've decided to get done today. But I constantly have to add up in my head or export to excel to see how much time I've budgeted. It would be great to see the total time budgeted on the bottom status bar so that I can see at a glance how much time I've budgeted to spend on things today and then adjust it to something realistic.