diff options
author | Olivier Maridat <olivier.maridat@trialog.com> | 2015-03-10 14:50:17 +0100 |
---|---|---|
committer | Olivier Maridat <olivier.maridat@trialog.com> | 2015-03-10 14:50:17 +0100 |
commit | b747b9750b697b863fcadbbbeb0ed94220e57961 (patch) | |
tree | be49de86d352d45aa837fe8657c67f02b858ca7d | |
parent | 80fb1ce1e5bd864179fe456a68515b6df5de1cb6 (diff) |
Order task links by labels and task column
-rw-r--r-- | app/Model/TaskLink.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/Model/TaskLink.php b/app/Model/TaskLink.php index f8e9f99e..62391371 100644 --- a/app/Model/TaskLink.php +++ b/app/Model/TaskLink.php @@ -4,6 +4,7 @@ namespace Model; use SimpleValidator\Validator; use SimpleValidator\Validators; +use PicoDb\Table; /** * TaskLink model @@ -57,6 +58,7 @@ class TaskLink extends Base ->join(Link::TABLE, 'id', 'link_id') ->join(Task::TABLE, 'id', 'opposite_task_id') ->join(Board::TABLE, 'id', 'column_id', Task::TABLE) + ->orderBy(Link::TABLE.'.id ASC, '.Board::TABLE.'.position ASC, '.Task::TABLE.'.is_active DESC, '.Task::TABLE.'.id', Table::SORT_ASC) ->findAll(); } |