summaryrefslogtreecommitdiff
path: root/app/Model/TaskFinder.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model/TaskFinder.php')
-rw-r--r--app/Model/TaskFinder.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/app/Model/TaskFinder.php b/app/Model/TaskFinder.php
index 7bca2284..1840b505 100644
--- a/app/Model/TaskFinder.php
+++ b/app/Model/TaskFinder.php
@@ -363,6 +363,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