summaryrefslogtreecommitdiff
path: root/models/task.php
diff options
context:
space:
mode:
authorFrédéric Guillot <contact@fredericguillot.com>2014-02-23 21:20:25 -0500
committerFrédéric Guillot <contact@fredericguillot.com>2014-02-23 21:20:25 -0500
commit4b7a72e931a52753855c8993c65ec8a017555f72 (patch)
tree20dfc9e82dc3f2026bc14e9538a5df668ffec201 /models/task.php
parent50051e776f9183471570f2688d0a85f92b309a3c (diff)
Add the possibility to change the assignee directly from the board
Diffstat (limited to 'models/task.php')
-rw-r--r--models/task.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/models/task.php b/models/task.php
index 9d23baf0..e227cc95 100644
--- a/models/task.php
+++ b/models/task.php
@@ -209,4 +209,21 @@ class Task extends Base
$v->getErrors()
);
}
+
+ public function validateAssigneeModification(array $values)
+ {
+ $v = new Validator($values, array(
+ new Validators\Required('id', t('The id is required')),
+ new Validators\Integer('id', t('This value must be an integer')),
+ new Validators\Required('project_id', t('The project is required')),
+ new Validators\Integer('project_id', t('This value must be an integer')),
+ new Validators\Required('owner_id', t('This value is required')),
+ new Validators\Integer('owner_id', t('This value must be an integer')),
+ ));
+
+ return array(
+ $v->execute(),
+ $v->getErrors()
+ );
+ }
}