Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2010-05-26 17:15:44 -0400
committerrelves2010-05-26 17:15:44 -0400
commitad10b0ae946d6ec3a4ab539b5ff133be553b6bde (patch)
tree4b5a5a0ac3622f534af78cc07c9cf7785b168692 /org.eclipse.mylyn.tasks.core
parentc600ebece9a5a456b70fa64d8157221c72b0bd6a (diff)
downloadorg.eclipse.mylyn.tasks-ad10b0ae946d6ec3a4ab539b5ff133be553b6bde.tar.gz
org.eclipse.mylyn.tasks-ad10b0ae946d6ec3a4ab539b5ff133be553b6bde.tar.xz
org.eclipse.mylyn.tasks-ad10b0ae946d6ec3a4ab539b5ff133be553b6bde.zip
NEW - bug 314166: fix the scheduled presentation bins and sort order
https://bugs.eclipse.org/bugs/show_bug.cgi?id=314166
Diffstat (limited to 'org.eclipse.mylyn.tasks.core')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ScheduledTaskContainer.java33
1 files changed, 30 insertions, 3 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ScheduledTaskContainer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ScheduledTaskContainer.java
index c92cf0a33..9f8947164 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ScheduledTaskContainer.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ScheduledTaskContainer.java
@@ -125,17 +125,44 @@ public class ScheduledTaskContainer extends AbstractTaskContainer {
Set<ITask> children = new HashSet<ITask>();
+ Calendar cal = TaskActivityUtil.getCalendar();
+
// All tasks scheduled for this date range
for (ITask task : activityManager.getScheduledTasks(range)) {
if (!task.isCompleted()
|| (task.isCompleted() && TaskActivityUtil.getDayOf(task.getCompletionDate()).isPresent())) {
+
+ if (task.getDueDate() != null
+ && task.getDueDate().before(
+ ((AbstractTask) task).getScheduledForDate().getStartDate().getTime())) {
+ continue;
+ }
+
+ if (range instanceof WeekDateRange && ((WeekDateRange) range).isThisWeek()
+ && task instanceof AbstractTask
+ && ((AbstractTask) task).getScheduledForDate() instanceof WeekDateRange) {
+
+ if (task.getDueDate() != null) {
+ cal.setTime(task.getDueDate());
+ if (range.includes(cal)) {
+ continue;
+ }
+ }
+
+ children.add(task);
+ }
+
children.add(task);
}
}
- // Add due tasks if not the This Week container
+ // Add due tasks if not the This Week container, and not scheduled for earlier date
if (!(range instanceof WeekDateRange && ((WeekDateRange) range).isPresent())) {
for (ITask task : activityManager.getDueTasks(range.getStartDate(), range.getEndDate())) {
+ DateRange scheduledDate = ((AbstractTask) task).getScheduledForDate();
+ if (scheduledDate != null && scheduledDate.before(range.getStartDate())) {
+ continue;
+ }
if (activityManager.isOwnedByUser(task)) {
children.add(task);
}
@@ -185,12 +212,12 @@ public class ScheduledTaskContainer extends AbstractTaskContainer {
@Override
public String getPriority() {
- return ""; //$NON-NLS-1$
+ return "";
}
@Override
public String getUrl() {
- return ""; //$NON-NLS-1$
+ return "";
}
@Override

Back to the top