Filter refactoring

This commit is contained in:
Frederic Guillot
2016-04-09 22:42:17 -04:00
parent 42813d702d
commit 11858be4e8
101 changed files with 3235 additions and 2841 deletions

View File

@@ -362,6 +362,27 @@ class TaskFinder extends Base
return $rq->fetch(PDO::FETCH_ASSOC);
}
/**
* 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
*