Bug 624211 - Current Tasks filter should only show completed tasks if completed today r=philipp ui-r=richard.marti
authorMatthew Mecca <matthew.mecca@gmail.com>
Thu, 14 Jul 2011 01:31:13 +0200
changeset 8282 640675ba244ac0749d3f87f58573ecb59da3ecec
parent 8281 dd41379e2ec129411f26de9752100d1498dbb488
child 8283 86474babc711c1cd5983b678e7d57056c510cdeb
push id107
push userbugzilla@standard8.plus.com
push dateTue, 16 Aug 2011 23:11:19 +0000
treeherdercomm-aurora@cefe50ba1568 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersphilipp, richard.marti
bugs624211
Bug 624211 - Current Tasks filter should only show completed tasks if completed today r=philipp ui-r=richard.marti
calendar/base/src/calFilter.js
--- a/calendar/base/src/calFilter.js
+++ b/calendar/base/src/calFilter.js
@@ -101,16 +101,26 @@ calFilter.prototype = {
         open: function cF_filterCompleted(item) {
             return (percentCompleted(item) < 100);
         },
         completed: function cF_filterCompleted(item) {
             return (percentCompleted(item) >= 100);
         },
         repeating: function cF_filterRepeating(item) {
             return (item.recurrenceInfo != null);
+        },
+        throughcurrent: function cF_filterThroughCurrent(item) {
+            if (!item.completedDate) {
+                return true;
+            }
+            // filter out tasks completed earlier than today
+            let today = cal.now();
+            today.isDate = true;
+
+            return (today.compare(item.completedDate) <= 0);
         }
     },
 
     get startDate() {
         return this.mStartDate;
     },
 
     set startDate(aStartDate) {