Improve Automatic Actions plugin api

This commit is contained in:
Frederic Guillot
2016-01-03 16:43:13 -05:00
parent d578b612ea
commit a296ba5b18
82 changed files with 3011 additions and 1665 deletions

View File

@@ -12,6 +12,17 @@ use Kanboard\Model\Task;
*/
class TaskDuplicateAnotherProject extends Base
{
/**
* Get automatic action description
*
* @access public
* @return string
*/
public function getDescription()
{
return t('Duplicate the task to another project');
}
/**
* Get the list of compatible events
*
@@ -51,7 +62,6 @@ class TaskDuplicateAnotherProject extends Base
return array(
'task_id',
'column_id',
'project_id',
);
}
@@ -65,7 +75,6 @@ class TaskDuplicateAnotherProject extends Base
public function doAction(array $data)
{
$destination_column_id = $this->board->getFirstColumn($this->getParam('project_id'));
return (bool) $this->taskDuplication->duplicateToProject($data['task_id'], $this->getParam('project_id'), null, $destination_column_id);
}