summaryrefslogtreecommitdiff
path: root/models/action.php
diff options
context:
space:
mode:
Diffstat (limited to 'models/action.php')
-rw-r--r--models/action.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/models/action.php b/models/action.php
index a0236eff..c8cbf3b1 100644
--- a/models/action.php
+++ b/models/action.php
@@ -44,6 +44,7 @@ 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'),
);
}
@@ -62,6 +63,7 @@ class Action extends Base
Task::EVENT_CREATE => t('Task creation'),
Task::EVENT_OPEN => t('Open a closed task'),
Task::EVENT_CLOSE => t('Closing a task'),
+ Task::EVENT_CREATE_UPDATE => t('Task creation or modification'),
);
}
@@ -239,6 +241,10 @@ class Action extends Base
require_once __DIR__.'/../actions/task_assign_color_user.php';
$className = '\Action\TaskAssignColorUser';
return new $className($project_id, new Task($this->db, $this->event));
+ case 'TaskAssignColorCategory':
+ require_once __DIR__.'/../actions/task_assign_color_category.php';
+ $className = '\Action\TaskAssignColorCategory';
+ return new $className($project_id, new Task($this->db, $this->event));
default:
throw new \LogicException('Action not found: '.$name);
}