diff options
author | Justin C. Klein Keane <justin@madirish.net> | 2016-04-20 14:39:13 -0400 |
---|---|---|
committer | Justin C. Klein Keane <justin@madirish.net> | 2016-04-20 14:39:13 -0400 |
commit | 6a9d5ede8b2c81c6bd67407fc0d8e46016720083 (patch) | |
tree | 92075b59e3789607b96d1afd9349d5e9ea26313c /app/Model/TaskFinder.php | |
parent | 1239920063457c7955129beaab9692c83e09676c (diff) |
Accidentally acced iCal function when merging Priority display, putting it back.
Diffstat (limited to 'app/Model/TaskFinder.php')
-rw-r--r-- | app/Model/TaskFinder.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/Model/TaskFinder.php b/app/Model/TaskFinder.php index beb312e1..0b2cbb84 100644 --- a/app/Model/TaskFinder.php +++ b/app/Model/TaskFinder.php @@ -140,6 +140,7 @@ class TaskFinder extends Base Project::TABLE.'.name AS project_name' ) ->join(User::TABLE, 'id', 'owner_id', Task::TABLE) + ->left(User::TABLE, 'uc', 'id', Task::TABLE, 'creator_id') ->join(Category::TABLE, 'id', 'category_id', Task::TABLE) ->join(Column::TABLE, 'id', 'column_id', Task::TABLE) ->join(Swimlane::TABLE, 'id', 'swimlane_id', Task::TABLE) @@ -365,6 +366,27 @@ class TaskFinder extends Base } /** + * Get iCal query + * + * @access public + * @return \PicoDb\Table + */ + public function getICalQuery() + { + return $this->db->table(Task::TABLE) + ->left(User::TABLE, 'ua', 'id', Task::TABLE, 'owner_id') + ->left(User::TABLE, 'uc', 'id', Task::TABLE, 'creator_id') + ->columns( + Task::TABLE.'.*', + 'ua.email AS assignee_email', + 'ua.name AS assignee_name', + 'ua.username AS assignee_username', + 'uc.email AS creator_email', + 'uc.username AS creator_username' + ); + } + + /** * Count all tasks for a given project and status * * @access public |