From 5f1dcf1ae8a978c996455824dc80bf77853f70c6 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 21 Feb 2015 14:24:00 -0500 Subject: Fix bug links with different columns (pull-request merge) --- app/Model/TaskLink.php | 3 ++- app/Template/task/show.php | 2 +- app/Template/tasklink/show.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Model/TaskLink.php b/app/Model/TaskLink.php index 85ad2737..f8e9f99e 100644 --- a/app/Model/TaskLink.php +++ b/app/Model/TaskLink.php @@ -51,11 +51,12 @@ class TaskLink extends Base Task::TABLE.'.title', Task::TABLE.'.is_active', Task::TABLE.'.project_id', - Task::TABLE.'.column_id' + Board::TABLE.'.title AS column_title' ) ->eq(self::TABLE.'.task_id', $task_id) ->join(Link::TABLE, 'id', 'link_id') ->join(Task::TABLE, 'id', 'opposite_task_id') + ->join(Board::TABLE, 'id', 'column_id', Task::TABLE) ->findAll(); } diff --git a/app/Template/task/show.php b/app/Template/task/show.php index 60243537..1ff2ef43 100644 --- a/app/Template/task/show.php +++ b/app/Template/task/show.php @@ -1,7 +1,7 @@ render('task/details', array('task' => $task, 'project' => $project)) ?> render('task/time', array('task' => $task, 'values' => $values, 'date_format' => $date_format, 'date_formats' => $date_formats)) ?> render('task/show_description', array('task' => $task)) ?> -render('tasklink/show', array('task' => $task, 'links' => $links, 'columns_list' => $columns_list)) ?> +render('tasklink/show', array('task' => $task, 'links' => $links)) ?> render('subtask/show', array('task' => $task, 'subtasks' => $subtasks)) ?> render('task/timesheet', array('task' => $task)) ?> render('file/show', array('task' => $task, 'files' => $files)) ?> diff --git a/app/Template/tasklink/show.php b/app/Template/tasklink/show.php index f759be5e..f0a70054 100644 --- a/app/Template/tasklink/show.php +++ b/app/Template/tasklink/show.php @@ -23,7 +23,7 @@ $link['is_active'] ? '' : 'task-link-closed' ) ?> - + e($link['column_title']) ?> a(t('Remove'), 'tasklink', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> -- cgit v1.2.3