From 1239920063457c7955129beaab9692c83e09676c Mon Sep 17 00:00:00 2001 From: "Justin C. Klein Keane" Date: Wed, 20 Apr 2016 14:24:05 -0400 Subject: Add sortable Priority column on overview table interface --- app/Model/TaskFinder.php | 24 ++---------------------- app/Template/app/tasks.php | 6 ++++++ 2 files changed, 8 insertions(+), 22 deletions(-) (limited to 'app') diff --git a/app/Model/TaskFinder.php b/app/Model/TaskFinder.php index d406b794..beb312e1 100644 --- a/app/Model/TaskFinder.php +++ b/app/Model/TaskFinder.php @@ -35,6 +35,7 @@ class TaskFinder extends Base Task::TABLE.'.date_started', Task::TABLE.'.project_id', Task::TABLE.'.color_id', + Task::TABLE.'.priority', Task::TABLE.'.time_spent', Task::TABLE.'.time_estimated', Project::TABLE.'.name AS project_name', @@ -67,6 +68,7 @@ class TaskFinder extends Base 'tasks.date_creation', 'tasks.project_id', 'tasks.color_id', + 'tasks.priority', 'tasks.time_spent', 'tasks.time_estimated', 'projects.name AS project_name' @@ -138,7 +140,6 @@ 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) @@ -363,27 +364,6 @@ 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 * diff --git a/app/Template/app/tasks.php b/app/Template/app/tasks.php index d7826fb7..e773bac6 100644 --- a/app/Template/app/tasks.php +++ b/app/Template/app/tasks.php @@ -9,6 +9,7 @@ order('Id', 'tasks.id') ?> order(t('Project'), 'project_name') ?> order(t('Task'), 'title') ?> + order('Priority', 'tasks.priority') ?> order(t('Due date'), 'date_due') ?> @@ -23,6 +24,11 @@ url->link($this->text->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + + 0): ?> + text->e($task['priority'])?> + + text->e($task['time_spent']).'h' ?> -- cgit v1.2.3 From 6a9d5ede8b2c81c6bd67407fc0d8e46016720083 Mon Sep 17 00:00:00 2001 From: "Justin C. Klein Keane" Date: Wed, 20 Apr 2016 14:39:13 -0400 Subject: Accidentally acced iCal function when merging Priority display, putting it back. --- app/Model/TaskFinder.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'app') 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) @@ -364,6 +365,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 * -- cgit v1.2.3