Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewSubTaskAction.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewSubTaskAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewSubTaskAction.java
index e89251d49..9a423eb59 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewSubTaskAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewSubTaskAction.java
@@ -33,8 +33,8 @@ import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
+import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.core.data.AbstractTaskDataHandler;
import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper;
import org.eclipse.mylyn.tasks.core.data.TaskData;
@@ -173,7 +173,10 @@ public class NewSubTaskAction extends BaseSelectionListenerAction implements IVi
AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
selectedTask.getConnectorKind());
AbstractTaskDataHandler taskDataHandler = connector.getTaskDataHandler();
- if (taskDataHandler == null || !taskDataHandler.canInitializeSubTaskData(null, selectedTask)) {
+
+ TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(
+ selectedTask.getRepositoryUrl());
+ if (taskDataHandler == null || !taskDataHandler.canInitializeSubTaskData(repository, selectedTask)) {
selectedTask = null;
}
}

Back to the top