Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2012-02-12 12:22:01 +0000
committerSteffen Pingel2012-02-12 12:22:01 +0000
commit23afd2a8112c4fb5d77f961aa1814a57c1840f93 (patch)
tree81ac50bf7f46ca6df3429e07c5ae062bf9d3af5e /org.eclipse.mylyn.tasks.core
parenta73ad6d430c3fcbcfbd0ef75765f1d6397ddc46e (diff)
downloadorg.eclipse.mylyn.tasks-23afd2a8112c4fb5d77f961aa1814a57c1840f93.tar.gz
org.eclipse.mylyn.tasks-23afd2a8112c4fb5d77f961aa1814a57c1840f93.tar.xz
org.eclipse.mylyn.tasks-23afd2a8112c4fb5d77f961aa1814a57c1840f93.zip
NEW - bug 371323: [regression] all comments are shown as incoming
https://bugs.eclipse.org/bugs/show_bug.cgi?id=371323 Change-Id: I20bd34a248dbfbd2e157ffdfda183aaa0fd30b00
Diffstat (limited to 'org.eclipse.mylyn.tasks.core')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttributeMapper.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttributeMapper.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttributeMapper.java
index 2c7687848..2b7d17f6d 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttributeMapper.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttributeMapper.java
@@ -47,6 +47,25 @@ public class TaskAttributeMapper {
}
public boolean equals(TaskAttribute newAttribute, TaskAttribute oldAttribute) {
+ if (TaskAttribute.TYPE_COMMENT.equals(newAttribute.getMetaData().getType())) {
+ if (newAttribute.getValues().equals(oldAttribute.getValues())) {
+ return true;
+ }
+ // the comment mapping accidentally changed throughout the Mylyn 3.7 cycle therefore some
+ // cases need to be considered equal even though attribute values differ
+ if (oldAttribute != null) {
+ TaskAttribute commentIdAttribute = oldAttribute.getAttribute("task.common.comment.id"); //$NON-NLS-1$
+ // ID not present
+ if ((commentIdAttribute == null || commentIdAttribute.getValue().equals("")) //$NON-NLS-1$
+ && newAttribute.getValue().equals("")) { //$NON-NLS-1$
+ return true;
+ }
+ // ID previously stored in a sub attribute
+ if (commentIdAttribute != null && commentIdAttribute.getValue().equals(newAttribute.getValue())) {
+ return true;
+ }
+ }
+ }
return newAttribute.getValues().equals(oldAttribute.getValues());
}

Back to the top