Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfbecker2011-03-04 21:43:33 +0000
committerfbecker2011-03-04 21:43:33 +0000
commit0398ef1f7a71d27ab20c4fd35de7fda975f9f86e (patch)
tree21d2a176a170ee16f76af9e09da7466208d2dfae
parent3c19569594c3a76e4d8defbf0ff57cc46cc61e0c (diff)
downloadorg.eclipse.mylyn.tasks-0398ef1f7a71d27ab20c4fd35de7fda975f9f86e.tar.gz
org.eclipse.mylyn.tasks-0398ef1f7a71d27ab20c4fd35de7fda975f9f86e.tar.xz
org.eclipse.mylyn.tasks-0398ef1f7a71d27ab20c4fd35de7fda975f9f86e.zip
REOPENED - bug 333075: Updating of repo configuration failed
https://bugs.eclipse.org/bugs/show_bug.cgi?id=333075
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java40
1 files changed, 22 insertions, 18 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java
index 6deac2540..5f9119600 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java
@@ -437,7 +437,8 @@ public class BugzillaTaskDataHandler extends AbstractTaskDataHandler {
if (component == null && repositoryConfiguration.getComponents(product).size() > 0) {
component = repositoryConfiguration.getComponents(product).get(0);
- } else {
+ }
+ if (component == null) {
if (repositoryConfiguration.getProducts().size() > 0) {
product = repositoryConfiguration.getProducts().get(0);
}
@@ -717,23 +718,26 @@ public class BugzillaTaskDataHandler extends AbstractTaskDataHandler {
public boolean initializeSubTaskData(TaskRepository repository, TaskData subTaskData, TaskData parentTaskData,
IProgressMonitor monitor) throws CoreException {
TaskMapper mapper = new TaskMapper(parentTaskData);
- initializeTaskData(repository, subTaskData, mapper, monitor);
- new TaskMapper(subTaskData).merge(mapper);
- subTaskData.getRoot().getMappedAttribute(BugzillaAttribute.DEPENDSON.getKey()).setValue(""); //$NON-NLS-1$
- subTaskData.getRoot().getMappedAttribute(TaskAttribute.DESCRIPTION).setValue(""); //$NON-NLS-1$
- subTaskData.getRoot().getMappedAttribute(TaskAttribute.SUMMARY).setValue(""); //$NON-NLS-1$
- TaskAttribute keywords = subTaskData.getRoot().getMappedAttribute(TaskAttribute.KEYWORDS);
- if (keywords != null) {
- // only if the repository has keywords this attribut exists
- keywords.setValue(""); //$NON-NLS-1$
- }
- subTaskData.getRoot().getAttribute(BugzillaAttribute.BLOCKED.getKey()).setValue(parentTaskData.getTaskId());
- TaskAttribute parentAttributeAssigned = parentTaskData.getRoot()
- .getMappedAttribute(TaskAttribute.USER_ASSIGNED);
- subTaskData.getRoot()
- .getAttribute(BugzillaAttribute.ASSIGNED_TO.getKey())
- .setValue(parentAttributeAssigned.getValue());
- return true;
+ if (initializeTaskData(repository, subTaskData, mapper, monitor)) {
+ new TaskMapper(subTaskData).merge(mapper);
+ subTaskData.getRoot().getMappedAttribute(BugzillaAttribute.DEPENDSON.getKey()).setValue(""); //$NON-NLS-1$
+ subTaskData.getRoot().getMappedAttribute(TaskAttribute.DESCRIPTION).setValue(""); //$NON-NLS-1$
+ subTaskData.getRoot().getMappedAttribute(TaskAttribute.SUMMARY).setValue(""); //$NON-NLS-1$
+ TaskAttribute keywords = subTaskData.getRoot().getMappedAttribute(TaskAttribute.KEYWORDS);
+ if (keywords != null) {
+ // only if the repository has keywords this attribut exists
+ keywords.setValue(""); //$NON-NLS-1$
+ }
+ subTaskData.getRoot().getAttribute(BugzillaAttribute.BLOCKED.getKey()).setValue(parentTaskData.getTaskId());
+ TaskAttribute parentAttributeAssigned = parentTaskData.getRoot().getMappedAttribute(
+ TaskAttribute.USER_ASSIGNED);
+ subTaskData.getRoot()
+ .getAttribute(BugzillaAttribute.ASSIGNED_TO.getKey())
+ .setValue(parentAttributeAssigned.getValue());
+ return true;
+ } else {
+ return false;
+ }
}
@Override

Back to the top