Add dropdown menu on each board column title to close all tasks

This commit is contained in:
Frederic Guillot
2016-01-17 11:03:33 -05:00
parent 3c57626918
commit d45fa6a33b
44 changed files with 310 additions and 72 deletions

View File

@@ -61,6 +61,32 @@ class TaskStatus extends Base
return $this->changeStatus($task_id, Task::STATUS_OPEN, 0, Task::EVENT_OPEN);
}
/**
* Close multiple tasks
*
* @access public
* @param array $task_ids
*/
public function closeMultipleTasks(array $task_ids)
{
foreach ($task_ids as $task_id) {
$this->close($task_id);
}
}
/**
* Close all tasks within a column/swimlane
*
* @access public
* @param integer $swimlane_id
* @param integer $column_id
*/
public function closeTasksBySwimlaneAndColumn($swimlane_id, $column_id)
{
$task_ids = $this->db->table(Task::TABLE)->eq('swimlane_id', $swimlane_id)->eq('column_id', $column_id)->findAllByColumn('id');
$this->closeMultipleTasks($task_ids);
}
/**
* Common method to change the status of task
*