Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker2012-05-16 16:08:23 -0400
committerFrank Becker2012-05-16 16:08:23 -0400
commit784727b40d8c33a247113e2c81ff45c0a204d32c (patch)
treef4736cfdb384f5d9aebe91fb1a860205573dc2af /org.eclipse.mylyn.tasks.bugs
parent506793345bf21cdce6e1a8769c27542d40df5299 (diff)
downloadorg.eclipse.mylyn.tasks-784727b40d8c33a247113e2c81ff45c0a204d32c.tar.gz
org.eclipse.mylyn.tasks-784727b40d8c33a247113e2c81ff45c0a204d32c.tar.xz
org.eclipse.mylyn.tasks-784727b40d8c33a247113e2c81ff45c0a204d32c.zip
REOPENED - bug 378230: "Submit failed: invalide severity [...]
'enhancement' https://bugs.eclipse.org/bugs/show_bug.cgi?id=378230 Change-Id: Id1d232efb1b5064e54efd4bdd29860c7488978d6
Diffstat (limited to 'org.eclipse.mylyn.tasks.bugs')
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/AttributeTaskMapper.java2
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/DefaultSupportHandler.java19
2 files changed, 13 insertions, 8 deletions
diff --git a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/AttributeTaskMapper.java b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/AttributeTaskMapper.java
index a2df487aa..68bdd4217 100644
--- a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/AttributeTaskMapper.java
+++ b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/AttributeTaskMapper.java
@@ -104,7 +104,7 @@ public class AttributeTaskMapper implements ITaskContribution, ISupportResponse
attributes.put(name, value);
}
- void setTaskData(TaskData taskData) {
+ public void setTaskData(TaskData taskData) {
this.taskData = taskData;
}
diff --git a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/DefaultSupportHandler.java b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/DefaultSupportHandler.java
index b9f462d0d..2d0373922 100644
--- a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/DefaultSupportHandler.java
+++ b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/DefaultSupportHandler.java
@@ -38,6 +38,7 @@ import org.osgi.framework.Bundle;
/**
* @author Steffen Pingel
+ * @author Frank Becker
*/
public class DefaultSupportHandler extends AbstractSupportHandler {
@@ -65,14 +66,18 @@ public class DefaultSupportHandler extends AbstractSupportHandler {
IStatus contribution = response.getStatus();
TaskData taskData = response.getTaskData();
if (contribution instanceof ProductStatus) {
- AbstractRepositoryConnector connector = TasksUi.getRepositoryConnector(taskData.getConnectorKind());
- ITaskMapping mapping = connector.getTaskMapping(taskData);
- mapping.merge(new TaskMapping() {
- @Override
- public String getSeverity() {
- return "enhancement"; //$NON-NLS-1$
+ if (response instanceof AttributeTaskMapper) {
+ if (((AttributeTaskMapper) response).getAttribute("severity") == null) {
+ AbstractRepositoryConnector connector = TasksUi.getRepositoryConnector(taskData.getConnectorKind());
+ ITaskMapping mapping = connector.getTaskMapping(taskData);
+ mapping.merge(new TaskMapping() {
+ @Override
+ public String getSeverity() {
+ return "enhancement"; //$NON-NLS-1$
+ }
+ });
}
- });
+ }
}
if (response.getProduct() != null) {
IBundleGroup bundleGroup = ((SupportProduct) response.getProduct()).getBundleGroup();

Back to the top