diff options
author | spingel | 2009-06-14 07:29:28 +0000 |
---|---|---|
committer | spingel | 2009-06-14 07:29:28 +0000 |
commit | 059d9d12f293487d24f5dfe99c05bf3b4b132d72 (patch) | |
tree | 3f63c9b4187514319fe9d94cae8b7e5ad33841ad /org.eclipse.mylyn.trac.core | |
parent | 2e0b7ae53891aef6a08004ddda836cc833d40aba (diff) | |
download | org.eclipse.mylyn.tasks-059d9d12f293487d24f5dfe99c05bf3b4b132d72.tar.gz org.eclipse.mylyn.tasks-059d9d12f293487d24f5dfe99c05bf3b4b132d72.tar.xz org.eclipse.mylyn.tasks-059d9d12f293487d24f5dfe99c05bf3b4b132d72.zip |
RESOLVED - bug 264930: [performance] Avoid duplicate task updates for non-disjunct queries in scheduled synchronizations
https://bugs.eclipse.org/bugs/show_bug.cgi?id=264930
Diffstat (limited to 'org.eclipse.mylyn.trac.core')
-rw-r--r-- | org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java index fa2e33997..a90723327 100644 --- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java +++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java @@ -641,19 +641,22 @@ public class TracRepositoryConnector extends AbstractRepositoryConnector { public void updateTaskFromTaskData(TaskRepository taskRepository, ITask task, TaskData taskData) { TaskMapper mapper = getTaskMapping(taskData); mapper.applyTo(task); - if (isCompleted(mapper.getStatus())) { - Date modificationDate = mapper.getModificationDate(); - if (modificationDate == null) { - // web mode does not set a date - modificationDate = DEFAULT_COMPLETION_DATE; + String status = mapper.getStatus(); + if (status != null) { + if (isCompleted(mapper.getStatus())) { + Date modificationDate = mapper.getModificationDate(); + if (modificationDate == null) { + // web mode does not set a date + modificationDate = DEFAULT_COMPLETION_DATE; + } + task.setCompletionDate(modificationDate); + } else { + task.setCompletionDate(null); } - task.setCompletionDate(modificationDate); - } else { - task.setCompletionDate(null); } task.setUrl(taskRepository.getRepositoryUrl() + ITracClient.TICKET_URL + taskData.getTaskId()); - task.setAttribute(TASK_KEY_SUPPORTS_SUBTASKS, Boolean.toString(taskDataHandler.supportsSubtasks(taskData))); if (!taskData.isPartial()) { + task.setAttribute(TASK_KEY_SUPPORTS_SUBTASKS, Boolean.toString(taskDataHandler.supportsSubtasks(taskData))); Date date = task.getModificationDate(); task.setAttribute(TASK_KEY_UPDATE_DATE, (date != null) ? TracUtil.toTracTime(date) + "" : null); //$NON-NLS-1$ } |