diff options
author | Frank Becker | 2015-02-21 14:31:52 +0000 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2015-07-30 19:59:09 +0000 |
commit | 869a056a29aac2a817adb0b2ce02b1bbe1d07a89 (patch) | |
tree | 539f5fd70d4fd346a90420f4507fdd04f5dd27cc /connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestConfiguration.java | |
parent | c3774ec86109fd47097b974ee51f2c0d2538305a (diff) | |
download | org.eclipse.mylyn.tasks-869a056a29aac2a817adb0b2ce02b1bbe1d07a89.tar.gz org.eclipse.mylyn.tasks-869a056a29aac2a817adb0b2ce02b1bbe1d07a89.tar.xz org.eclipse.mylyn.tasks-869a056a29aac2a817adb0b2ce02b1bbe1d07a89.zip |
414360: add support for Task update
Change-Id: I4374580bfe58dafe735c95820c434f8d7100bb85
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=414360
Diffstat (limited to 'connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestConfiguration.java')
-rw-r--r-- | connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestConfiguration.java | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestConfiguration.java b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestConfiguration.java index 1572e3818..3dbf3bc8b 100644 --- a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestConfiguration.java +++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestConfiguration.java @@ -120,6 +120,7 @@ public class BugzillaRestConfiguration implements Serializable { for (String key : data.getRoot().getAttributes().keySet()) { if (key.equals(BugzillaRestTaskSchema.getDefault().ADD_SELF_CC.getKey()) || key.equals(BugzillaRestTaskSchema.getDefault().NEW_COMMENT.getKey()) + || key.equals(BugzillaRestTaskSchema.getDefault().DUPE_OF.getKey()) || key.equals(TaskAttribute.OPERATION)) { continue; } @@ -396,6 +397,11 @@ public class BugzillaRestConfiguration implements Serializable { } TaskAttribute attribute = bugReport.getRoot() .createAttribute(TaskAttribute.PREFIX_OPERATION + attributeStatusValue); + if (attributeStatusValue.equals("RESOLVED")) { + attribute.getMetaData().putValue(TaskAttribute.META_ASSOCIATED_ATTRIBUTE_ID, + BugzillaRestTaskSchema.getDefault().RESOLUTION.getKey()); + } + TaskOperation.applyTo(attribute, attributeStatusValue, attributeStatusValue); // set as default TaskOperation.applyTo(operationAttribute, attributeStatusValue, attributeStatusValue); @@ -425,8 +431,15 @@ public class BugzillaRestConfiguration implements Serializable { } attribute = bugReport.getRoot().createAttribute(TaskAttribute.PREFIX_OPERATION + "duplicate"); TaskOperation.applyTo(attribute, "duplicate", "Mark as Duplicate"); - TaskAttribute attrResolvedInput = attribute.getTaskData().getRoot().createAttribute("dup_id"); + TaskAttribute attrResolvedInput = attribute.getTaskData() + .getRoot() + .getAttribute(BugzillaRestTaskSchema.getDefault().DUPE_OF.getKey()); + if (attrResolvedInput == null) { + attrResolvedInput = attribute.getTaskData() + .getRoot() + .createAttribute(BugzillaRestTaskSchema.getDefault().DUPE_OF.getKey()); + } attrResolvedInput.getMetaData().setType(TaskAttribute.TYPE_TASK_DEPENDENCY); - attribute.getMetaData().putValue(TaskAttribute.META_ASSOCIATED_ATTRIBUTE_ID, "dup_id"); + attribute.getMetaData().putValue(TaskAttribute.META_ASSOCIATED_ATTRIBUTE_ID, attrResolvedInput.getId()); } }
\ No newline at end of file |