Close all subtasks when a task is closed
This commit is contained in:
@@ -227,6 +227,18 @@ class Subtask extends Base
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Close all subtasks of a task
|
||||
*
|
||||
* @access public
|
||||
* @param integer $task_id
|
||||
* @return boolean
|
||||
*/
|
||||
public function closeAll($task_id)
|
||||
{
|
||||
return $this->db->table(self::TABLE)->eq('task_id', $task_id)->update(array('status' => self::STATUS_DONE));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get subtasks with consecutive positions
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user