From 4b7a72e931a52753855c8993c65ec8a017555f72 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sun, 23 Feb 2014 21:20:25 -0500 Subject: Add the possibility to change the assignee directly from the board --- models/task.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'models/task.php') 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() + ); + } } -- cgit v1.2.3