diff options
author | Dzial Techniczny WMW Projekt s.c <techniczna@wmwprojekt.pl> | 2020-01-15 15:54:11 +0100 |
---|---|---|
committer | Dzial Techniczny WMW Projekt s.c <techniczna@wmwprojekt.pl> | 2020-01-15 15:54:11 +0100 |
commit | b6f34622b169652c57e7cabd8d11e28605f110c3 (patch) | |
tree | 39496fdf3c35177aaccb394bba8cd46d221b6426 /app/Model | |
parent | 3317d87addb03688a08a7fb12200b4913125dba7 (diff) |
Extending extended query for tasks with possible hooks
Diffstat (limited to 'app/Model')
-rw-r--r-- | app/Model/TaskFinderModel.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/Model/TaskFinderModel.php b/app/Model/TaskFinderModel.php index 8e6b081a..22454e0d 100644 --- a/app/Model/TaskFinderModel.php +++ b/app/Model/TaskFinderModel.php @@ -77,7 +77,7 @@ class TaskFinderModel extends Base */ public function getExtendedQuery() { - return $this->db + $query = $this->db ->table(TaskModel::TABLE) ->columns( '(SELECT COUNT(*) FROM '.CommentModel::TABLE.' WHERE task_id=tasks.id) AS nb_comments', @@ -136,6 +136,8 @@ class TaskFinderModel extends Base ->join(ColumnModel::TABLE, 'id', 'column_id', TaskModel::TABLE) ->join(SwimlaneModel::TABLE, 'id', 'swimlane_id', TaskModel::TABLE) ->join(ProjectModel::TABLE, 'id', 'project_id', TaskModel::TABLE); + $query = $this->hook->reference('task:query:extended', $query); + return $query; } /** |