Fix bug links with different columns (pull-request merge)

This commit is contained in:
Frederic Guillot
2015-02-21 14:24:00 -05:00
parent 651528d705
commit 5f1dcf1ae8
3 changed files with 4 additions and 3 deletions

View File

@@ -51,11 +51,12 @@ class TaskLink extends Base
Task::TABLE.'.title', Task::TABLE.'.title',
Task::TABLE.'.is_active', Task::TABLE.'.is_active',
Task::TABLE.'.project_id', Task::TABLE.'.project_id',
Task::TABLE.'.column_id' Board::TABLE.'.title AS column_title'
) )
->eq(self::TABLE.'.task_id', $task_id) ->eq(self::TABLE.'.task_id', $task_id)
->join(Link::TABLE, 'id', 'link_id') ->join(Link::TABLE, 'id', 'link_id')
->join(Task::TABLE, 'id', 'opposite_task_id') ->join(Task::TABLE, 'id', 'opposite_task_id')
->join(Board::TABLE, 'id', 'column_id', Task::TABLE)
->findAll(); ->findAll();
} }

View File

@@ -1,7 +1,7 @@
<?= $this->render('task/details', array('task' => $task, 'project' => $project)) ?> <?= $this->render('task/details', array('task' => $task, 'project' => $project)) ?>
<?= $this->render('task/time', array('task' => $task, 'values' => $values, 'date_format' => $date_format, 'date_formats' => $date_formats)) ?> <?= $this->render('task/time', array('task' => $task, 'values' => $values, 'date_format' => $date_format, 'date_formats' => $date_formats)) ?>
<?= $this->render('task/show_description', array('task' => $task)) ?> <?= $this->render('task/show_description', array('task' => $task)) ?>
<?= $this->render('tasklink/show', array('task' => $task, 'links' => $links, 'columns_list' => $columns_list)) ?> <?= $this->render('tasklink/show', array('task' => $task, 'links' => $links)) ?>
<?= $this->render('subtask/show', array('task' => $task, 'subtasks' => $subtasks)) ?> <?= $this->render('subtask/show', array('task' => $task, 'subtasks' => $subtasks)) ?>
<?= $this->render('task/timesheet', array('task' => $task)) ?> <?= $this->render('task/timesheet', array('task' => $task)) ?>
<?= $this->render('file/show', array('task' => $task, 'files' => $files)) ?> <?= $this->render('file/show', array('task' => $task, 'files' => $files)) ?>

View File

@@ -23,7 +23,7 @@
$link['is_active'] ? '' : 'task-link-closed' $link['is_active'] ? '' : 'task-link-closed'
) ?> ) ?>
</td> </td>
<td><?= $columns_list[$link['column_id']] ?></td> <td><?= $this->e($link['column_title']) ?></td>
<td> <td>
<?= $this->a(t('Remove'), 'tasklink', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->a(t('Remove'), 'tasklink', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</td> </td>