diff options
Diffstat (limited to 'app/Model')
-rw-r--r-- | app/Model/Color.php | 2 | ||||
-rw-r--r-- | app/Model/TaskFilter.php | 1 | ||||
-rw-r--r-- | app/Model/TaskFinder.php | 22 |
3 files changed, 15 insertions, 10 deletions
diff --git a/app/Model/Color.php b/app/Model/Color.php index a35aff8f..1fd81b85 100644 --- a/app/Model/Color.php +++ b/app/Model/Color.php @@ -193,11 +193,11 @@ class Color extends Base $buffer = ''; foreach ($this->default_colors as $color => $values) { - $buffer .= 'td.color-'.$color.','; $buffer .= 'div.color-'.$color.' {'; $buffer .= 'background-color: '.$values['background'].';'; $buffer .= 'border-color: '.$values['border']; $buffer .= '}'; + $buffer .= 'td.color-'.$color.' { background-color: '.$values['background'].'}'; } return $buffer; diff --git a/app/Model/TaskFilter.php b/app/Model/TaskFilter.php index b14dad0a..4a086078 100644 --- a/app/Model/TaskFilter.php +++ b/app/Model/TaskFilter.php @@ -214,7 +214,6 @@ class TaskFilter extends Base */ public function filterByCategoryName(array $values) { - $this->query->join(Category::TABLE, 'id', 'category_id'); $this->query->beginOr(); foreach ($values as $category) { diff --git a/app/Model/TaskFinder.php b/app/Model/TaskFinder.php index e007187f..181ff360 100644 --- a/app/Model/TaskFinder.php +++ b/app/Model/TaskFinder.php @@ -97,10 +97,16 @@ class TaskFinder extends Base 'tasks.recurrence_parent', 'tasks.recurrence_child', 'tasks.time_estimated', - 'users.username AS assignee_username', - 'users.name AS assignee_name' + User::TABLE.'.username AS assignee_username', + User::TABLE.'.name AS assignee_name', + Category::TABLE.'.name AS category_name', + Board::TABLE.'.title AS column_name', + Project::TABLE.'.name AS project_name' ) - ->join(User::TABLE, 'id', 'owner_id'); + ->join(User::TABLE, 'id', 'owner_id', Task::TABLE) + ->join(Category::TABLE, 'id', 'category_id', Task::TABLE) + ->join(Board::TABLE, 'id', 'column_id', Task::TABLE) + ->join(Project::TABLE, 'id', 'project_id', Task::TABLE); } /** @@ -115,11 +121,11 @@ class TaskFinder extends Base public function getTasksByColumnAndSwimlane($project_id, $column_id, $swimlane_id = 0) { return $this->getExtendedQuery() - ->eq('project_id', $project_id) - ->eq('column_id', $column_id) - ->eq('swimlane_id', $swimlane_id) - ->eq('is_active', Task::STATUS_OPEN) - ->asc('tasks.position') + ->eq(Task::TABLE.'.project_id', $project_id) + ->eq(Task::TABLE.'.column_id', $column_id) + ->eq(Task::TABLE.'.swimlane_id', $swimlane_id) + ->eq(Task::TABLE.'.is_active', Task::STATUS_OPEN) + ->asc(Task::TABLE.'.position') ->findAll(); } |