diff options
4 files changed, 6 insertions, 5 deletions
diff --git a/app/Controller/ExternalTaskCreationController.php b/app/Controller/ExternalTaskCreationController.php index 501c6e2e..0d87c0b6 100644 --- a/app/Controller/ExternalTaskCreationController.php +++ b/app/Controller/ExternalTaskCreationController.php @@ -44,7 +44,7 @@ class ExternalTaskCreationController extends BaseController if (empty($values)) { $values = $this->request->getValues(); - $externalTask = $taskProvider->fetch($taskProvider->buildTaskUri($values)); + $externalTask = $taskProvider->fetch($taskProvider->buildTaskUri($values), $project['id']); $values = $externalTask->getFormValues() + array( 'external_uri' => $externalTask->getUri(), @@ -56,7 +56,7 @@ class ExternalTaskCreationController extends BaseController 'owner_id' => $this->userSession->getId(), ); } else { - $externalTask = $taskProvider->fetch($values['external_uri']); + $externalTask = $taskProvider->fetch($values['external_uri'], $project['id']); } $this->response->html($this->template->render('external_task_creation/step2', array( diff --git a/app/Controller/ExternalTaskViewController.php b/app/Controller/ExternalTaskViewController.php index 18bc15c1..6719b653 100644 --- a/app/Controller/ExternalTaskViewController.php +++ b/app/Controller/ExternalTaskViewController.php @@ -17,7 +17,7 @@ class ExternalTaskViewController extends BaseController try { $task = $this->getTask(); $taskProvider = $this->externalTaskManager->getProvider($task['external_provider']); - $externalTask = $taskProvider->fetch($task['external_uri']); + $externalTask = $taskProvider->fetch($task['external_uri'], $task['project_id']); $this->response->html($this->template->render($taskProvider->getViewTemplate(), array( 'task' => $task, diff --git a/app/Controller/TaskModificationController.php b/app/Controller/TaskModificationController.php index b253428f..7164ce0c 100644 --- a/app/Controller/TaskModificationController.php +++ b/app/Controller/TaskModificationController.php @@ -117,7 +117,7 @@ class TaskModificationController extends BaseController try { $taskProvider = $this->externalTaskManager->getProvider($task['external_provider']); $params['template'] = $taskProvider->getModificationFormTemplate(); - $params['external_task'] = $taskProvider->fetch($task['external_uri']); + $params['external_task'] = $taskProvider->fetch($task['external_uri'], $task['project_id']); } catch (ExternalTaskAccessForbiddenException $e) { throw new AccessForbiddenException($e->getMessage()); } catch (ExternalTaskException $e) { diff --git a/app/Core/ExternalTask/ExternalTaskProviderInterface.php b/app/Core/ExternalTask/ExternalTaskProviderInterface.php index 5678efb8..7a8157f4 100644 --- a/app/Core/ExternalTask/ExternalTaskProviderInterface.php +++ b/app/Core/ExternalTask/ExternalTaskProviderInterface.php @@ -40,9 +40,10 @@ interface ExternalTaskProviderInterface * @access public * @throws \Kanboard\Core\ExternalTask\ExternalTaskException * @param string $uri + * @param int $projectID * @return ExternalTaskInterface */ - public function fetch($uri); + public function fetch($uri, $projectID); /** * Save external task to another system |