diff options
author | Christopher Geelen <christopher.geelen@vinotion.nl> | 2016-07-27 13:58:23 +0200 |
---|---|---|
committer | Christopher Geelen <christopher.geelen@vinotion.nl> | 2016-07-27 13:58:23 +0200 |
commit | 24745182724ca69092554eb5946e31584420f68a (patch) | |
tree | 386cdf7a8d7bf7ad2d80d938333bafbaf0fedcbc /app/Formatter | |
parent | 160c0b885eb4f1a1a1baa2b6b9fc6d99fdb80d0c (diff) | |
parent | 9649f7ba82ba7fe6a470abfe9f65e214cc68fa34 (diff) |
Merge remote-tracking branch 'upstream/master'
Conflicts:
app/Job/NotificationJob.php
Diffstat (limited to 'app/Formatter')
-rw-r--r-- | app/Formatter/TaskAutoCompleteFormatter.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/Formatter/TaskAutoCompleteFormatter.php b/app/Formatter/TaskAutoCompleteFormatter.php index 4f1c4c69..2d9f7341 100644 --- a/app/Formatter/TaskAutoCompleteFormatter.php +++ b/app/Formatter/TaskAutoCompleteFormatter.php @@ -3,6 +3,7 @@ namespace Kanboard\Formatter; use Kanboard\Core\Filter\FormatterInterface; +use Kanboard\Model\ProjectModel; use Kanboard\Model\TaskModel; /** @@ -21,11 +22,15 @@ class TaskAutoCompleteFormatter extends BaseFormatter implements FormatterInterf */ public function format() { - $tasks = $this->query->columns(TaskModel::TABLE.'.id', TaskModel::TABLE.'.title')->findAll(); + $tasks = $this->query->columns( + TaskModel::TABLE.'.id', + TaskModel::TABLE.'.title', + ProjectModel::TABLE.'.name AS project_name' + )->asc(TaskModel::TABLE.'.id')->findAll(); foreach ($tasks as &$task) { $task['value'] = $task['title']; - $task['label'] = '#'.$task['id'].' - '.$task['title']; + $task['label'] = $task['project_name'].' > #'.$task['id'].' '.$task['title']; } return $tasks; |