Hide tasks within specific columns in dashboard (#2424)
This commit is contained in:
committed by
Frédéric Guillot
parent
b215296f97
commit
6ccd8c11fa
@@ -144,13 +144,14 @@ class ColumnModel extends Base
|
||||
* @param string $description Column description
|
||||
* @return boolean|integer
|
||||
*/
|
||||
public function create($project_id, $title, $task_limit = 0, $description = '')
|
||||
public function create($project_id, $title, $task_limit = 0, $description = '', $hide_in_dashboard = 0)
|
||||
{
|
||||
$values = array(
|
||||
'project_id' => $project_id,
|
||||
'title' => $title,
|
||||
'task_limit' => intval($task_limit),
|
||||
'position' => $this->getLastColumnPosition($project_id) + 1,
|
||||
'hide_in_dashboard' => $hide_in_dashboard,
|
||||
'description' => $description,
|
||||
);
|
||||
|
||||
@@ -167,11 +168,12 @@ class ColumnModel extends Base
|
||||
* @param string $description Optional description
|
||||
* @return boolean
|
||||
*/
|
||||
public function update($column_id, $title, $task_limit = 0, $description = '')
|
||||
public function update($column_id, $title, $task_limit = 0, $description = '', $hide_in_dashboard = 0)
|
||||
{
|
||||
return $this->db->table(self::TABLE)->eq('id', $column_id)->update(array(
|
||||
'title' => $title,
|
||||
'task_limit' => intval($task_limit),
|
||||
'hide_in_dashboard' => $hide_in_dashboard,
|
||||
'description' => $description,
|
||||
));
|
||||
}
|
||||
|
||||
@@ -81,7 +81,8 @@ class TaskFinderModel extends Base
|
||||
->join(ColumnModel::TABLE, 'id', 'column_id')
|
||||
->eq(TaskModel::TABLE.'.owner_id', $user_id)
|
||||
->eq(TaskModel::TABLE.'.is_active', TaskModel::STATUS_OPEN)
|
||||
->eq(ProjectModel::TABLE.'.is_active', ProjectModel::ACTIVE);
|
||||
->eq(ProjectModel::TABLE.'.is_active', ProjectModel::ACTIVE)
|
||||
->eq(ColumnModel::TABLE.'.hide_in_dashboard', 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user