Add a new automatic action: assign a category based on a defined color

This commit is contained in:
Frédéric Guillot
2014-05-27 11:40:07 -04:00
parent 73944ae368
commit c482e70469
7 changed files with 100 additions and 6 deletions

View File

@@ -42,7 +42,8 @@ class Action extends Base
'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'),
'TaskAssignColorCategory' => t('Assign a color to a specific category'),
'TaskAssignColorCategory' => t('Assign automatically a color based on a category'),
'TaskAssignCategoryColor' => t('Assign automatically a category based on a color'),
);
}
@@ -237,6 +238,9 @@ class Action extends Base
case 'TaskAssignColorCategory':
$className = '\Action\TaskAssignColorCategory';
return new $className($project_id, new Task($this->db, $this->event));
case 'TaskAssignCategoryColor':
$className = '\Action\TaskAssignCategoryColor';
return new $className($project_id, new Task($this->db, $this->event));
default:
throw new LogicException('Action not found: '.$name);
}