Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2008-06-24 08:10:38 +0000
committerspingel2008-06-24 08:10:38 +0000
commit68fd5ef47b85cad5cd410af655654d65ae0804f8 (patch)
tree6210acaadf30e54b021359584c445e904903c58c
parent4d1f851c8781abe4d28d7b4e420981320d648dec (diff)
downloadorg.eclipse.mylyn.tasks-R_3_0_0.tar.gz
org.eclipse.mylyn.tasks-R_3_0_0.tar.xz
org.eclipse.mylyn.tasks-R_3_0_0.zip
NEW - bug 238039: port Trac test cases to Mylyn 3.0R_3_0_0
https://bugs.eclipse.org/bugs/show_bug.cgi?id=238039
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskMapper.java50
1 files changed, 50 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskMapper.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskMapper.java
index d0a63e395..1f0b2f461 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskMapper.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskMapper.java
@@ -30,6 +30,56 @@ public class TracTaskMapper extends TaskMapper {
}
@Override
+ public boolean applyTo(ITask task) {
+ boolean changed = false;
+ if (hasChanges(task.getCompletionDate(), TaskAttribute.DATE_COMPLETION)) {
+ task.setCompletionDate(getCompletionDate());
+ changed = true;
+ }
+ if (hasChanges(task.getCreationDate(), TaskAttribute.DATE_CREATION)) {
+ task.setCreationDate(getCreationDate());
+ changed = true;
+ }
+ if (hasChanges(task.getModificationDate(), TaskAttribute.DATE_MODIFICATION)) {
+ task.setModificationDate(getModificationDate());
+ changed = true;
+ }
+ if (hasChanges(task.getDueDate(), TaskAttribute.DATE_DUE)) {
+ task.setDueDate(getDueDate());
+ changed = true;
+ }
+ if (hasChanges(task.getOwner(), TaskAttribute.USER_ASSIGNED)) {
+ task.setOwner(getOwner());
+ changed = true;
+ }
+ if (hasChanges(task.getPriority(), TaskAttribute.PRIORITY)) {
+ if (getPriorityLevel() != null) {
+ task.setPriority(getPriorityLevel().toString());
+ } else {
+ task.setPriority(PriorityLevel.getDefault().toString());
+ }
+ changed = true;
+ }
+ if (hasChanges(task.getSummary(), TaskAttribute.SUMMARY)) {
+ task.setSummary(getSummary());
+ changed = true;
+ }
+ if (hasChanges(task.getTaskKey(), TaskAttribute.TASK_KEY)) {
+ task.setTaskKey(getTaskKey());
+ changed = true;
+ }
+ if (hasChanges(task.getTaskKind(), TaskAttribute.TASK_KIND)) {
+ task.setTaskKind(getTaskKind());
+ changed = true;
+ }
+ if (hasChanges(task.getUrl(), TaskAttribute.TASK_URL)) {
+ task.setUrl(getTaskUrl());
+ changed = true;
+ }
+ return changed;
+ }
+
+ @Override
public boolean hasChanges(ITask task) {
boolean changed = false;
changed |= hasChanges(task.getCompletionDate(), TaskAttribute.DATE_COMPLETION);

Back to the top