Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2009-06-14 07:29:28 +0000
committerspingel2009-06-14 07:29:28 +0000
commit059d9d12f293487d24f5dfe99c05bf3b4b132d72 (patch)
tree3f63c9b4187514319fe9d94cae8b7e5ad33841ad /org.eclipse.mylyn.trac.core
parent2e0b7ae53891aef6a08004ddda836cc833d40aba (diff)
downloadorg.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.java21
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$
}

Back to the top