From c482e704697301a982e3c989ac795e0f4c2e899a Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Tue, 27 May 2014 11:40:07 -0400 Subject: Add a new automatic action: assign a category based on a defined color --- app/Model/Action.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/Model') diff --git a/app/Model/Action.php b/app/Model/Action.php index 7cd917e9..0e3aee71 100644 --- a/app/Model/Action.php +++ b/app/Model/Action.php @@ -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); } -- cgit v1.2.3