| | <?php |
| |
|
| | namespace Kanboard\Action; |
| |
|
| | use Kanboard\Model\TaskModel; |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | class TaskMoveSwimlaneCategoryChange extends Base |
| | { |
| | |
| | |
| | |
| | |
| | |
| | |
| | public function getDescription() |
| | { |
| | return t('Move the task to another swimlane when the category is changed'); |
| | } |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | public function getCompatibleEvents() |
| | { |
| | return array( |
| | TaskModel::EVENT_UPDATE, |
| | ); |
| | } |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | public function getActionRequiredParameters() |
| | { |
| | return array( |
| | 'dest_swimlane_id' => t('Destination swimlane'), |
| | 'category_id' => t('Category'), |
| | ); |
| | } |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | public function getEventRequiredParameters() |
| | { |
| | return array( |
| | 'task_id', |
| | 'task' => array( |
| | 'project_id', |
| | 'column_id', |
| | 'category_id', |
| | 'position', |
| | 'swimlane_id', |
| | ) |
| | ); |
| | } |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | public function doAction(array $data) |
| | { |
| | return $this->taskPositionModel->movePosition( |
| | $data['task']['project_id'], |
| | $data['task_id'], |
| | $data['task']['column_id'], |
| | $data['task']['position'], |
| | $this->getParam('dest_swimlane_id'), |
| | false |
| | ); |
| | } |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | public function hasRequiredCondition(array $data) |
| | { |
| | return $data['task']['swimlane_id'] != $this->getParam('dest_swimlane_id') && $data['task']['category_id'] == $this->getParam('category_id'); |
| | } |
| | } |
| |
|