summaryrefslogtreecommitdiff
path: root/app/Model/Subtask.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model/Subtask.php')
-rw-r--r--app/Model/Subtask.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/Model/Subtask.php b/app/Model/Subtask.php
index 65fa0f0c..a869ae91 100644
--- a/app/Model/Subtask.php
+++ b/app/Model/Subtask.php
@@ -228,6 +228,18 @@ class Subtask extends Base
}
/**
+ * 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
*
* If you remove a subtask, the positions are not anymore consecutives