Add tasks in bulk from the board

This commit is contained in:
Frederic Guillot
2016-05-13 21:44:31 -04:00
parent a1a48b8374
commit 10f662ce07
8 changed files with 167 additions and 9 deletions

View File

@@ -69,6 +69,32 @@ class TaskValidator extends Base
);
}
/**
* Validate task creation
*
* @access public
* @param array $values Form values
* @return array $valid, $errors [0] = Success or not, [1] = List of errors
*/
public function validateBulkCreation(array $values)
{
$rules = array(
new Validators\Required('project_id', t('The project is required')),
new Validators\Required('tasks', t('Field required')),
new Validators\Required('column_id', t('Field required')),
new Validators\Required('swimlane_id', t('Field required')),
new Validators\Integer('category_id', t('This value must be an integer')),
new Validators\Integer('swimlane_id', t('This value must be an integer')),
);
$v = new Validator($values, array_merge($rules, $this->commonValidationRules()));
return array(
$v->execute(),
$v->getErrors()
);
}
/**
* Validate description creation
*