Add an automatic action to assign a color to a specific user

This commit is contained in:
Frédéric Guillot
2014-03-10 22:23:16 -04:00
parent 1cda8059b5
commit 66c7cf0caa
7 changed files with 62 additions and 2 deletions

View File

@@ -26,6 +26,7 @@ class Action extends Base
'TaskAssignSpecificUser' => t('Assign the task to a specific user'),
'TaskAssignCurrentUser' => t('Assign the task to the person who does the action'),
'TaskDuplicateAnotherProject' => t('Duplicate the task to another project'),
'TaskAssignColorUser' => t('Assign a color to a specific user'),
);
}
@@ -217,6 +218,10 @@ class Action extends Base
require_once __DIR__.'/../actions/task_duplicate_another_project.php';
$className = '\Action\TaskDuplicateAnotherProject';
return new $className($project_id, new Task($this->db, $this->event));
case 'TaskAssignColorUser':
require_once __DIR__.'/../actions/task_assign_color_user.php';
$className = '\Action\TaskAssignColorUser';
return new $className($project_id, new Task($this->db, $this->event));
default:
throw new \LogicException('Action not found: '.$name);
}